步骤#
-
创建 .bash_profile 文件,如果没有的话
-
在 export 环境变量后,添加如下内容
eval "$(/opt/homebrew/bin/brew shellenv)" if [ -z "$INTELLIJ_ENVIRONMENT_READER" ]; then # Attempt to run fish as login shell, even if bash is technically the # login 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/