原文 Back to a vanilla (fish) shell - Updated on 2024-09-06: Since `exa` is no longer maintained, we need to add the following in `~/.config/fish/config.fish` instead:
if type -q eza
    alias ll "eza -l -g --icons"
    alias lla "ll -a"
end
  • Decided to say goodbye to oh-my-zsh after a decade and pursue the pure joy of simplicity.1
  • Uninstalled oh-my-zsh with uninstall_oh_my_zsh. (This is handy, I’ll give it that.)
  • Installed fish from Homebrew brew install fish
  • Followed this gist to set fish as default shell. The documentation might be outdated since the default path to fish is now different: /opt/homebrew/bin/fish. Thanks to macOS’s updates in recent years.
  • Added the list of “known shells”: sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells'
  • Restarted the CLI and ran command: chsh -s /opt/homebrew/bin/fish.
  • Restarted the CLI and added brew binaries in fish path: fish_add_path /opt/homebrew/bin
  • Added a few aliases frequently used in ~/.config/fish/config.fish.
  • Added a snippet to use exa eza easily. Credit to Ruihao Li.
  • Used cmd+shift+p in VSC to install code command in PATH.
  • Used fish_config to customize my shell prompt.

Now I’m in peace now.

以下为 GPT-4o 翻译内容:

  • 2024-09-06更新: 由于 exa 已不再维护,我们需要在 ~/.config/fish/config.fish 中添加以下内容:
if type -q eza
    alias ll "eza -l -g --icons"
    alias lla "ll -a"
end

以下是文章内容的翻译,涉及到代码块的部分保持不变:

回到原始(fish)shell

  • 更新于2024-09-06:由于exa不再维护,我们需要在~/.config/fish/config.fish中添加以下内容:
if type -q eza
    alias ll "eza -l -g --icons"
    alias lla "ll -a"
end
  • 决定在使用了十年后告别 oh-my-zsh,追求纯粹的简单快乐。1
  • 使用 uninstall_oh_my_zsh 卸载了 oh-my-zsh.(这很方便,我承认这一点。)
  • 从 Homebrew 安装了 fishbrew install fish
  • 根据这个 gistfish 设置为默认shell。由于近年来macOS的更新,文档可能已经过时,因为 fish 的默认路径现在不同:/opt/homebrew/bin/fish
  • 添加了“已知 shell ”列表:sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells'

  1. To be precise, I also removed Starship from my last post as fish is pretty good function-wise straight out of box. ↩︎ ↩︎