howaboutqiu

回归 vanilla (fish) shell

原文 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 翻译内容:

if type -q eza
    alias ll "eza -l -g --icons"
    alias lla "ll -a"
end

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

回到原始(fish)shell

if type -q eza
    alias ll "eza -l -g --icons"
    alias lla "ll -a"
end

我终于平静了。


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

#cli