Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

&& is a major one. Also !! for sudo !!


Fish'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 !!”.


It 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).


Care to explain what this does? Thanks


!! 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!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: