News for hackers. Stuff that matters.
Re:$!134 can be a nice bash foot shooter if you accidentally... by kreetx on Tuesday December 28, 2021 @12:58PM (#29716123)
What are the "\e[A" and "\e[B" do, are they key presses?

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.

Re:$!134 can be a nice bash foot shooter if you accidentally... by aulin on Tuesday December 28, 2021 @10:22PM (#29721428)
Yep, it binds history search to key up and key down. Start typing a command, press up or down and it will scroll through matching completions from history