LoginSignup
5
4

More than 1 year has passed since last update.

fishの環境構築 (M1 mac)

Posted at

fishを導入する際に少し躓いたので備忘録として残しておく。

fishをインストール

brew install fish

M1 macでは、パスが異なるので注意。
/opt/homebrew/bin/fishにインストールされる。

fishのパスを追加

vi /etc/shellsで末尾に

opt/homebrew/bin/fish

を追加する。

chsh -s /opt/homebrew/bin/fish

でデフォルトのシェルを変更する。
再起動すると、shellがfishに変更される。

fishにbrewのパスを通す

fishはbashやzshと非互換であり、brewのPATHが通っていない(echo and $PATHで確認できる)。

セッションを起動するために環境変数が設定されるよう、config.fishを書き換える。
vi ~/.config/fish.config.fish

set PATH /opt/homebrew/bin $PATH

を追加する。

fish_config

コマンドで見た目を変えられる。

https://akashima.net/2021/11/06/1189/
https://qiita.com/ledsun/items/8ca1a450b21c8ebc9670

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4