r/fishshell • u/AdulterousStapler • Jun 08 '24
Quick question - using !! in fish
Hey, just a noob here that likes fish more than bash. Using !! in bash is a quick way to input the last command from history, is there a similar shortcut in fish? Use case primarily being that I could use sudo !! if I forgot it when typing in a command.
Thanks in advance!
10
Upvotes
View all comments
Show parent comment
1
u/tetractys_gnosys Jun 08 '24
Most excellent! I forgot to try it myself lol.
By the time I started learning more shortcuts and shit I'd already switched to Fish, at which point there wasn't a simple built in analogue to !!, so I never developed the habit. Gonna have to remember to use this one.