bytes.zone

Bang Shortcuts

Brian Hicks, December 8, 2020

Another you-get-to-join-the-lucky-ten-thousand post here!

There are a bunch of shortcuts involving exclamation marks that shells will automatically expand. There are so many things you can do with these! (See the "History Expansion" section of the Bash manual page) I just want to highlight a few of the ones I use every day:

Some shells (ZSH at least) will automatically expand these for you if you hit tab after typing them so you can see what you're in for before you commit.

If you'd like me to email you when I have a new post, sign up below and I'll do exactly that!

If you just have questions about this, or anything I write, please feel free to email me!