53

I installed fish with homebrew on Mac OS Big Sur, Apple Silicon. Then I added /opt/homebrew/bin/fish to /etc/shells. When I now start fish from the default shell, it recognises all commands (like git flow init). After changing the default shell with chsh -s /opt/homebrew/bin/fish, suddenly it won't recognise anything anymore and always gives a Unknown command. I haven't found anything regarding this issue and uninstalled fish and brew several times...

dusen
  • 531
  • 1
  • 4
  • 3

1 Answers1

104

Here are the steps I used to setup the fish shell on my M1 MacBook Air. Per the comments on the question, the key to solving the Unknown Command issue is the fish_add_path:

$ brew install fish ​
$ fish
$ fish_add_path /opt/homebrew/bin
$ echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells
$ chsh -s /opt/homebrew/bin/fish

Hyomin Kim
  • 1,151
  • 1
  • 7
  • 7