Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.
Note that you need the https://brew.sh/ package manager installed on your machine.
brew install fish
More info: https://fishshell.com/docs/current/tutorial.html#tut_path
Check the fish path with which fish
. In the examples below it was located at: /opt/homebrew/bin/fish
On older Macs default path is /usr/local/bin/fish
, replace accordingly in the instruction below.
- check the fish path with
which fish
. In the examples below it was located at:/opt/homebrew/bin/fish
. On older Macs the path might differ. - Add fish to the know shells
run the command:
sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells'
- Restart your terminal
- Set fish as the default shell
run the command:
chsh -s /opt/homebrew/bin/fish
- Restart your terminal and check if it launched with
fish
or not - Add brew binaries in fish path
run the command:
fish_add_path /opt/homebrew/bin
To collect command completions for all commands run:
fish_update_completions
I edited the ~/.config/fish/config.fish to have my terminal in english
set -x LANG en_US.UTF-8
You can configure your shell by launching the web interface, run:
fish_config
@Theminijohn This is mainly about personal preferences. But I found MacPort to be a lot more stable and replicable and more "Unix". If I build something today, it will build tomorrow. This is not the case with brew. I also like that everything is in /opt without exception.
The brew selling points: "building only things that the system do not provide" and "no need of sudo" are irrelevant to me. Especially the first make it very sensitive to any macOS changes.
Also, their website is less "cool" but I prefer the tools they provide. For example https://ports.macports.org/port/fish/summary vs https://formulae.brew.sh/formula/fish .
Last brew is written in ruby, a language that I have today no incentive to learn.
So in my opinion, MacPorts is superior in is architecture, toolings, stability, ... It's why I use it ;). Give it a try!