I used to be able to use up
and down
arrow to find my history, including failed commands that did return a different retval, correct them and try again.
After I installed fzf
something changed, and now I only have successful commands in my history which return a value, everything else simply isn't there.
I suspect I've either changed something in one of my script configs, or fzf changed something:
.bashrc
.fzf.bash
.profile
.bash_profile
Unfortunately this is extremely annoying and I've no idea how to fix it. For example, typing:
which python
sudo apt-cache
produces in .bash_history
:
#1601901660
which python
but not the sudo apt-cache
command.
Running the following command:
grep HIST ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/* /etc/environment .fzf.bash 2>/dev/null
Produces:
/home/tons/.bashrc:HISTCONTROL=ignoreboth
/home/tons/.bashrc:HISTSIZE=
/home/tons/.bashrc:HISTFILESIZE=
/home/tons/.bashrc:export HISTTIMEFORMAT="%h %d %H:%M:%S "
/home/tons/.bashrc:export HISTSIZE=10000
/home/tons/.bashrc:export HISTFILESIZE=10000
/home/tons/.bashrc:export HISTCONTROL=ignorespace:erasedups
/home/tons/.bashrc:export HISTIGNORE="ls:ps:history"
/home/tons/.bashrc:export HISTIGNORE="s*"
grep HIST ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/* /etc/environment .fzf.bash 2>/dev/null
so we can see your history settings.HISTIGNORE
that changed something?HISTIGNORE="s*"
should explain missingsudo
. But not commands starting with something other than an s.