7 ms·
I use the following lines in my .bashrc to search the history based on a half-typed command (taken from https://stackoverflow.com/questions/1030182/how-do-i-cha
by sertorius 9y ago
I use the following lines in my .bashrc to search the history based on a half-typed command (taken from https://stackoverflow.com/questions/1030182/how-do-i-change-bash-history-completion-to-complete-whats-already-on-the-line https://stackoverflow.com/questions/1030182/how-do-i-change-...):
if [[ $- == *i* ]]
then
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
fi
- spinningarrow 9y agoThere are two history search features in fish that I really like: One is searching for a half typed command as above, but the other one that I haven’t found elsewhere is completing words from other commands. For example, I can type ‘touch something’ and later on do ‘cat some’ and then press option+up and fish will complete it to ‘something’.
- figgis 9y agoAfter using ZSH I have that first feature and love it. I try to keep as much of my history as possible and it's amazing how much time you can save that way. Does that second feature not clutter up that history though?