4 ms·
I'm sure this exists in some form somewhere but something I really want is a way to pull up my command history numbered with a shortcut and then punch that numb
by iKlsR 5y ago
I'm sure this exists in some form somewhere but something I really want is a way to pull up my command history numbered with a shortcut and then punch that number to run the last command than mindlessly hitting the up arrow for several seconds (why do we do this?). If anyone knows anything that has this functionality please share, thanks.
- cyberbanjo 5y ago!10 Runs tenth last command
- iKlsR 5y agoYes and there is also Ctrl+R which kicks off a recursive search which is what I use most of the time but what about the complex 2 liner with pipes and dates 19 commands ago? :)
- deleted 5y ago[deleted]
- mechtaev 5y agofzf can partially solve this, as shown in this blog post: https://nickjanetakis.com/blog/fuzzy-search-your-bash-history-in-style-with-fzf https://nickjanetakis.com/blog/fuzzy-search-your-bash-histor...
- iKlsR 5y agoExactly what I'm looking for, they even prelude with what I typed above, thanks.
- hotsauceror 5y agoEDIT: Oh. Duh. Brain freeze. Well, I’ll leave this here anyway. Won’t this work: $ history | grep SOME_UNIQUE_PART_OF_YOUR_TWO_LINER And then $ !HISTORYID ? I do this almost daily and with my bash history set to 10000 lines I pretty much find everything.
- e3bc54b2 5y agoTry fzf. It lets searching recursively and out of order through history, file system, and can be inserted anywhere in a pipe.
- iKlsR 5y agoThanks, this was what I was looking for.