I have this bash function:
r () {
builtin cd $HOME/rex
rex $@
builtin cd $OLDPWD
}
It is invoked with r blahblah
.
I would like the r blahblah
saved to my bash history. Currently, nothing gets saved to the history when I run r blahblah
.
$HISTCONTROL is ignorespace
$HISTIGNORE is r *:lb:eb*
The problem was a malconfigured HISTIGNORE
bash variable which told bash to ignore any commands beginning with r *
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.