所須套件
▶ My shell setup:
- Fish shell: https://fishshell.com/
- Fisher: https://github.com/jorgebucaran/fisher
- Shellder: https://github.com/simnalamburt/shellder
- Nerd fonts: https://github.com/ryanoasis/nerd-fonts
- z for fish: https://github.com/jethrokuan/z
- Exa: https://the.exa.website/
使用 Homebrew 安裝 Fish shell
開啟 Terminal 安裝套件管理工具 Homebrew
|
|
接著執行以下兩行命令,將 Homebrew 添加到 PATH:

透過 Homebrew 安裝 Fish shell
|
|
設定 Fish shell 為預設 shell
- Add fish to the know shells run the command:
sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells' - Restart your terminal
- Set fish as the default shell run the command:
chsh -s /opt/homebrew/bin/fish
在 Fish shell 中,錯誤的指令會以紅色顯示,但為什麼 brew 也顯示紅色?

將 brew 加入 fish 路徑可解決
|
|

安裝 Fisher 套件管理
shell 輸入
|
|
使用 install 命令安裝套件,後接 GitHub 上存儲庫的路徑。
|
|
例如安裝套件 Z
|
|
查看已安裝套件
|
|

指令操作
|
|
安裝 Oh My Fish
|
|
安裝好 Oh-my-fish 後,可以安裝喜歡的主題。
安裝 shellder 主題
|
|

查看已安裝主題
|
|
已安裝的主題有 agnoster 和 shellder

配置主題
|
|
移除主題
|
|
指令操作
|
|
安裝 MesloLGS 字型與 Nerd Fonts 字體
當無法正確顯示字型與特殊 Icon 時:

- 安裝四個字型
- 安裝 Nerd Fonts
|
|
字型安裝完成後,Terminal 設定 > 偏好設定 > 描述檔, 更改字體為 Meslo LG S NF 。

可視化配置
|
|
安裝其它套件
Z (Directory jumper)
套件 z 類似於 autojump ,快速移到到想去的資料夾。
|
|
sponge
失敗或是打錯的指令不會記錄到歷史清單中
|
|
exa
安裝套件 exa
|
|
顯示圖標
|
|

tree view
|
|

|
|

Config
alias
使用 vim 編輯 config.fish 設定檔
|
|
設定別名
|
|
設定完成後要重開 terminal 才會生效