步驟#
-
創建 .bash_profile 文件,如果尚未存在
-
在 export 環境變數後,添加以下內容
eval "$(/opt/homebrew/bin/brew shellenv)" if [ -z "$INTELLIJ_ENVIRONMENT_READER" ]; then # 嘗試運行 fish 作為登錄 shell,即使 bash 在技術上是登錄 shell。 FISH=$(env PATH="$HOME/local/bin:$HOME/local/homebrew/bin:$PATH" which fish) if [[ -x "$FISH" ]]; then exec env SHELL="$FISH" "$FISH" -i fi fi
參考#
https://github.com/ithinkihaveacat/dotfiles/blob/master/home/.bash_profile
https://www.reddit.com/r/fishshell/comments/qxo8rk/is_fish_your_default_shell_or_just_your/