安裝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
12 |
# zsh-completionsfpath=(/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">修改iTerm2
安裝iTerm2配色包
1 |
git clone https://github.com/mbadolato/iTerm2-Color-Schemes.git ~/iTermTheme |
https://medium.com/statementdog-engineering/prettify-your-zsh-command-line-prompt-3ca2acc967f
更新Node.js
看版本
12 |
node -vnpm -v |
清除cache
1 |
sudo npm cache clean -f |
安裝工具
1 |
sudo npm install -g n |
選擇版本安裝
1 |
sudo n latest |
1 |
sudo n stable |
1 |
sudo n 8.9.0 |
刪除某一版的nodejs
1 |
sudo n rm 9.0.0 |
更新npm
1 |
sudo npm install [email protected] -g |
Reference
Homebrew
https://brew.sh/index_zh-tw.html
Zsh
https://github.com/unixorn/awesome-zsh-plugins
http://icarus4.logdown.com/posts/177661-from-bash-to-zsh-setup-tips
https://pjchender.blogspot.tw/2017/02/mac-terminal-iterm-2-oh-my-zsh.html
http://xanxusvervr.blogspot.tw/2017/06/mac.html
Zsh Theme
https://github.com/marszall87/nodeys-zsh-theme
原文地址:https://www.cnblogs.com/lijianming180/p/12099546.html
时间: 2024-10-09 13:11:14