設定MacOS 終端機環境 (Homebrew/zsh/oh-my-zsh/iTerm2)

安裝Homebrew

1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

更新Homebrew

1
brew update

安裝wget

1
brew install wget

安裝zsh

1
brew install zsh

更新zsh

1
brew upgrade zsh

修改預設shell為zsh

1
$ chsh -s /usr/local/bin/zsh

安裝oh-my-zsh

1
$ git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

安裝zsh-completions

1
brew install zsh-completions

新增設定 (我習慣用nano開…很多範例都用vim 也是可以XD)

nano .zshrc
1
2
# zsh-completions
fpath=(/usr/local/share/zsh-completions $fpath)

rebuild zsh 的 .zcompdump

1
$ rm -f ~/.zcompdump; compinit

切換zsh theme

1
ZSH_THEME="THEME NAME"

安裝zsh-syntax-highlighting程式碼高亮

1
brew install zsh-syntax-highlighting

安裝iTerm2

1
brew cask install iterm2

大专栏  設定MacOS 終端機環境 (Homebrew/zsh/oh-my-zsh/iTerm2)href="#修改iTerm2" class="headerlink" title="修改iTerm2">

上一篇:国产deepin配合神器zsh


下一篇:金山打字通 右手练习