Answer the question
In order to leave comments, you need to log in
How to make that in the linux console the last command is filtered by the first characters entered?
The last command when pressing the up arrow.
In my opinion, this was in the shell under the fryakha, but I don’t remember anymore :)
Is it possible to do this through bash?
Answer the question
In order to leave comments, you need to log in
search by first characters is available in zsh.
for bash it is done like this:
# add to /etc/inputrc or ~/.inputrc
"\e[A":history-search-backward
"\e[B":history-search-forward
You can use PgUp/PgDw instead of ctrl+R/ctrl+S. Go to /etc/inputrc and add
"\e[5~": history-search-backward # Previous
"\e[6~": history-search-forward # Next
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question