[Fish](https://fishshell.com/) is an interactive command line shell designed around user-friendliness.
It has been my daily driver interactive shell since around 2018, replacing my brief forway into ZSH. I still write most of my non-interactive scripts using [[Bash - Unix Shell|bash]] syntax, but the goal is to move to a generic broadly-compatible `ash`-style script built on [[Modern.sh - Shell Scripting for the 21st Century|modern.sh]] once it has the requisite shims in place.
https://github.com/fish-shell/fish-shell
# Criticism
Fish is actively developed and doesn't always worry about full backwards compatibility if it means a better user experience going forward.
It is not [[POSIX]] compliant nor backwards compatible with any other shell.
I have had situations where Fish has broken due to an update or config change and it has become impossible to use the terminal.
As a result, it is not safe to use Fish as a login shell.
# Tips
## Integration with [[Homebrew]] on Linux
[[Homebrew]] wisely installs itself as a dedicated user rather than as `root` on Linux. However the documentation for how to use the `brew` command with Fish is lacking, even though the `brew shellenv` command does support Fish syntax.
```sh
if test -e /home/linuxbrew/.linuxbrew/bin/brew
env SHELL=fish /home/linuxbrew/.linuxbrew/bin/brew shellenv | source
end
```
## Environment
Fish environment variable syntax is (partially) compatible with [[csh - Unix Shell]], which means that many programs which support `csh` can also easily integrate with Fish.
# References
- https://www.reddit.com/r/fishshell/comments/j7i9e0/homebrew_on_fish_as_default_shell_in_wsl/
- https://docs.brew.sh/Shell-Completion#configuring-completions-in-fish
- https://docs.brew.sh/Manpage#shellenv-bashcshfishpwshshtcshzsh