|
|
|
|
|
by aulin
1641 days ago
|
|
I always add "\e[A": history-search-backward
"\e[B": history-search-forward
to my .inputrc, I find it easier to use than C-r as it's some sort of autocomplete from history. But looking up commands with !number can still be very useful when you don't remember the command you need but remember when you used it (e.g. what commands you ran before and after). |
|
I usually do `history | grep ...` to find the command and then use it.
Non-emacs users might tend to find this surprising, but in a shell buffer you can move around with your cursor like in a text file, so after executing `history` you can search for the command as string then copy-paste it.