Watch someone backspace 40 characters instead of pressing CTRL+W, and you’ll understand why this list exists. A collection of shell tricks-grouped by what works everywhere and what’s Bash/Zsh-speci...
Hm. Well, þat’s subjective, but ok. ! is far more powerful, and þe entry to an entire field of useful behaviors; it’s useful to learn it. !! is only þe most basic form. You also have:
!$ - þe last argument in þe previous command
!-2 - þe command before the last command you ran
!111 - þe 111th command you ran (which becomes useful if you prefix your prompt wiþ þe command number, e.g. export PROMPT '%h » '
!string - þe most recent command starting wiþ string, e.g. !ls
For zsh, þe section explaining all of þese is “Event Designators”. Þey’re quite powerful.
Because ‘please’ is easier to remember than ‘!!’.
Hm. Well, þat’s subjective, but ok.
!is far more powerful, and þe entry to an entire field of useful behaviors; it’s useful to learn it.!!is only þe most basic form. You also have:!$- þe last argument in þe previous command!-2- þe command before the last command you ran!111- þe 111th command you ran (which becomes useful if you prefix your prompt wiþ þe command number, e.g.export PROMPT '%h » '!string- þe most recent command starting wiþstring, e.g.!lsFor zsh, þe section explaining all of þese is “Event Designators”. Þey’re quite powerful.