Even quicker with fish: Write the first few letters then it auto-suggests the last-run command matching that prefix (and then you can still arrow up to cycle through all matches).
(There is also a zsh plugin for that, called zsh-autosuggestions.)
A lot of stuff assumes Bash, so occasionally when the syntax differs its slightly annoying; sometimes you have to modify a few lines of a file or something (or run it as in Bash manually). Fish is so nice though. It really should replace Bash for almost everyone. If you really need Bash you can still use it.
With script files, you can (and should regardless of Fish usage) put a shebang at the top, like #!/bin/sh or #!/bin/bash. Then it will run with Bash as you’d expect.
I also recommend not setting Fish as your system-wide default shell (since then a missing shebang will cause it to run in Fish), but rather just have your terminal emulator start fish by default.
And yeah, outside of scripting, if I notice a command requires Bash syntax (which you can often tell from Fish’s syntax highlighting turning red), then I just run bash, execute the Bash command in there and then exit back out of there.
Having said all that, I’m not trying to take away from your point. If I wasn’t just joking around, I would caveat a Fish recommendation just as much.
Yeah, it’s just some scripts that come with programs sometimes not including that is the issue. Like I said, it isn’t a big issue, just occasionally requires small edits if you try to run the script in Fish, or, like you said, running them with Bash.
Even quicker with zsh or atuin: write the first few letters then arrow up to cycle through all matches
Even quicker with fish: Write the first few letters then it auto-suggests the last-run command matching that prefix (and then you can still arrow up to cycle through all matches).
(There is also a zsh plugin for that, called zsh-autosuggestions.)
A lot of stuff assumes Bash, so occasionally when the syntax differs its slightly annoying; sometimes you have to modify a few lines of a file or something (or run it as in Bash manually). Fish is so nice though. It really should replace Bash for almost everyone. If you really need Bash you can still use it.
With script files, you can (and should regardless of Fish usage) put a shebang at the top, like
#!/bin/sh
or#!/bin/bash
. Then it will run with Bash as you’d expect.I also recommend not setting Fish as your system-wide default shell (since then a missing shebang will cause it to run in Fish), but rather just have your terminal emulator start
fish
by default.And yeah, outside of scripting, if I notice a command requires Bash syntax (which you can often tell from Fish’s syntax highlighting turning red), then I just run
bash
, execute the Bash command in there and thenexit
back out of there.Having said all that, I’m not trying to take away from your point. If I wasn’t just joking around, I would caveat a Fish recommendation just as much.
Yeah, it’s just some scripts that come with programs sometimes not including that is the issue. Like I said, it isn’t a big issue, just occasionally requires small edits if you try to run the script in Fish, or, like you said, running them with Bash.
I main ZSH and I’ve been CTRL+R’ing for years damn here I am a fool
Glad to be of service