A shell exclamation mark is not for yelling. Be lazy.

Coders found a lazy keyboard trick, and the comments instantly turned into a war

TLDR: An old keyboard shortcut lets people reuse previous command-line text with an exclamation mark instead of retyping it. Readers were wildly split: some loved the lazy speed boost, while others called it confusing, forgettable, and one step away from another ridiculous editor holy war.

A delightfully nerdy post tried to remind people of an old command-line trick: the humble exclamation mark can pull bits from earlier commands so you don’t have to type the same thing twice. In plain English, it’s a shortcut for reusing what you already typed — handy for things like retrying a failed command with administrator powers or jumping back to a folder without retyping a long path. The article pitches it as peak laziness, basically telling readers: stop hammering the up arrow and let your shell do the remembering.

But the real fireworks were in the comments, where readers split into camps almost immediately. One side saw the whole thing as clever-but-cursed. Terr_ said it inspired not coolness but “despair” because command lines already feel hard enough to read, and this only makes them more cryptic. Joker_vD piled on with the brutal comparison that using these shortcuts is like relying on your memory instead of just using a tool that shows you what’s there. In other words: why play memory games when Ctrl+R search or visual file managers exist?

Then came the comedy. One commenter admitted this tip hits them with the classic, “oh right, I could do that” — followed by instantly forgetting it again. And the hottest joke came from the editor war crowd, where bash’s default shortcuts somehow turned into a mock moral panic about Emacs ruining careers, families, and reputations. So yes, a tiny punctuation mark became the latest battleground in the never-ending saga of programmers arguing over the “right” way to be lazy.

Key Points

  • The article explains shell history expansion, or event designators, for interactive shells including bash, csh, tcsh, and zsh.
  • It shows that exclamation-mark syntax can reuse previous commands, command matches, and selected arguments instead of retyping them.
  • Examples include `sudo !!`, `!ssh`, `!:1`, `!$:h`, and argument reuse across commands such as SSH, ffmpeg, and scp workflows.
  • The article defines the syntax pattern as `![event][:word][:modifier]`, separating command selection, word selection, and text transformation.
  • It notes that the feature is intended for interactive shell sessions rather than shell scripts and points POSIX users toward `fc` as a related tool.

Hottest takes

"I end up just feeling despair" — Terr_
"oh right, I could do that" and then immediately forget — userbinator
"Being known as an emacs user could cost you a job... or even cause rifts with family and friends" — b112
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.