3 ms·
&& is a major one. Also !! for sudo !!
by jdlyga 9y ago
&& is a major one. Also !! for sudo !!
- eu 9y agoCare to explain what this does? Thanks
- pta2002 9y ago!! is the last command, so sudo !! will run the last command as root. e.g. apt install foo # you need root permissions to install, won't work sudo !! # will expand to sudo apt install foo, and it'll work!
- udp 9y agoIt would be great if Fish supported &&. I know it has its own syntax for this but it's not particularly fun going through a command you copy pasted from elsewhere and swapping out all the &&s (I usually just end up firing up bash).
- roryokane 9y agoFish's FAQ already explains why it doesn't use `!!` – it says that editing commands from history by pressing the up arrow is more memorable and flexible. I don't find it a problem to type “up Ctrl-A sudo” instead of “sudo !!”.