參考資料:https://hackercodex.com/guide/install-fish-shell-mac-ubuntu/#basic-configuration
我是透過PPA安裝bleeding-edge的fish,因此以下只會介紹這種方法的安裝與個人使用心得
輸入以下指令(其實就跟連結中一樣),附上指令說明
sudo add-apt-repository ppa:fish-shell/nightly-master
(將github上的fish shell資料加到apt裡面)
sudo apt-get update
(才剛加到apt裡所以更新)
sudo apt-get install fish
(安裝fish shell)
chsh -s /usr/bin/fish
(將fish shell設定成默認的shell)
(設定成zsh則打chsh -s /bin/zsh,不知為何fish多了usr)
mkdir -p ~/.config/fish
(在~/.config這個資料夾裡創造名為fish的資料夾)
vim ~/.config/fish/config.fish
(創造名為config.fish的文件)
然後再創造的這個文件打以下這行
set -g -x PATH /usr/local/bin $PATH
(增加/usr/local/bin到PATH這個環境變數中
接下來重開terminal(如果成功,terminal一開始應該會有輸出一些東西),然後輸入
fish_config
(他會開啟預設瀏覽器讓你設定fish shell)
fish_update_completions
(好像是更新,要定期執行)
echo "set -g -x fish_greeting ''(這是兩個單引號)" >> ~/.config/fish/config.fish
(這樣是設定開啟terminal不顯示任何東西,如果你想顯示東西就加在兩個單引號裡)
(EX:echo "set -g -x fish_greeting 'Hello World'">> ~/.config/fish/config.fish,這樣就會顯示Hello World)
以上就是基本的安裝與設定
待補