Ctrl R
holy fucking shit 🤌💪🤯❤️💯
I’ve been using
ctrl + Rmore now :3… though I definitely used to ↑↑↑↑↑↑↑Woah Ctrl R looks super cool, never knew that I could do that before…
check out fzf (install fzf and add (assuming bash)
eval "$(fzf --bash)"to your .bashrc) Makes ctrl+r a superpower
Fish once again undefeated. If I want to find that weird image magick command I used earlier with foo.png in it I just type
foo.png, hit up and its usually the first one. It doesnt matter where foo.png occurs in the command, fish will find it.The number of people who don’t reverse-I-search is too damn high
CTRL+R for those unitiated
It was quite a while before I realised that was possible.
Then not long after starting to use it, that I got fed up and just started opening up the history file and searching in it.why not
history | grep -iand the search term?even if there are several, you can use ! and the command’s line number to run it again
historyis shell dependent.
I write part of the command then ctrl+r. Using FZF mind you. Such a great utility.
…until you press up one too many times and enter the same command but with a typo. Again.
Been there, done that.
There is an option you can set in .zshrc or .bashrc which only includes lines that exit 0 (success)
Infuriatingly that would omit things like unit test runners from the history in case they don’t pass. As a developer I tend to re-run failed commands quite often, not sure how widely that applies, though.
I knew there was an
lsIn there somewhere
ctrl + r, l, s
Much faster than simply typing
ls!
I typed it once, I’m not typing it again

or documentation.^r
and whenever you forget to sudo:
sudo !!You need this: https://github.com/nvbn/thefuck
https://github.com/atuinsh/atuin is a great tool to manage and search your shell history. I especially enjoy it being able to search commands based on the working directory I was in when I ran them.
It also has more features (which I don’t use) to manage dotfiles and sync shell history across hosts/devices.
This is why I like atuin, I can just press up and start typing part of the command and it will likely find it in my history.
taptaptaptap… taptaptaptap… taptaptaptap taptaptaptap taptaptaptap
… taptaptaptap
… tap …
… shit I was on a different user when I typed it.
Too many people still use Bash.
Too many distributions still ship with Bash.
In the real world, the only thing better than perfect is standardized.
Yeah, true. But, it’s easy to change.
Bash is the Internet Explorer of shells. It’s great for installing a more useful shell.
What shell do you recommend?
I like zsh, but some people say great things about fish.
My problem with those is bash is always there and just works.
Yes, just like Internet Explorer.
It’s good to know how to do things in bash, since you’re going to encounter it pretty often. But, that doesn’t mean you shouldn’t customize your shell on the machine(s) you use most often. Why stick with the default when there are better options? You’re just hobbling yourself.
The one people see me doing that gets a “huh?” Is:
~$ !find find -type f -name '*blah*' -print0 | xargs -0 gzip ~$“Wait! What did you do?” “Oh. Do you not know about bang?”










