Kuang-Cheng, Chien
6/3/2017 - 1:32 PM

Install fish shell

Install fish shell

# 以下動作需要切換到使用者家目錄再開始進行
cd ~ 

# 透過brew安裝fish
brew install fish

# 把 "/usr/local/bin/fish" 登錄到 /etc/shells
echo "/usr/local/bin/fish" | sudo tee -a /etc/shells

# 將fish shell設定為預設的shell
chsh -s /usr/local/bin/fish

# 安裝Oh My Fish
curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install | fish

# 安裝 nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash

# 安裝 fish shell 的nvm 套件
ofm install nvm

# 透過brew安裝python
brew install python

# 安裝Powerline
# 下列兩個指令,選擇其中一條執行即可,差別只在於一個是安裝current release 版本
# 一個是安裝 latest development release版本

# 1. 安裝 current release 版本
pip install powerline-status

# 2. 安裝 latest development release版本
# pip install git+git://github.com/powerline/powerline

# 安裝 Powerline shell style 命令提示字元

git clone https://github.com/milkbikis/powerline-shell
cd powerline-shell
cp config.py.dist config.py
./install.py
# Copy this file to ~/.config/fish/
function fish_prompt
  ~/powerline-shell/powerline-shell.py $status --shell bare ^/dev/null
end