简体   繁体   中英

My fish is blind? (fish does not recognise any commands after setting it as default shell on Mac OS Big Sur, M1 Mac)

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

Here are the steps what I did to setup fish shell on my m1 macbook air. (Thanks for the comments)

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

done!

I would be happy if someone who use apple silicon succeeded in this way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM