yum install -y zshgit
cat /etc/shellsgithub
chsh -s /bin/zshshell
克隆當前session或者退出去再進來下session
安裝oh my zshapp
國外主機能夠直接安裝ssh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
國內該域名被牆了,只能乖乖手動curl
git clone https://github.com/ohmyzsh/ohmyzsh.gitide
cd tools/url
./install.shspa
修改你喜歡的主題
vi ~/.zshrc
其餘主題
ls /root/ohmyzsh/themes
我喜歡這主題
ZSH_THEME="bira"
配置了下快捷鍵
# Example aliases
alias zshconfig="vi ~/.zshrc"
alias zshconfigapply="source ~/.zshrc"
alias ohmyzsh="mate ~/.oh-my-zsh"
alias lll='ls -lrth'
alias sshmgmta=' ssh cust-cu-ch_lf-mgmt_a'
alias sshmgmtb=' ssh cust-cu-ch_lf-mgmt_b'
搞兩個插件,歷史命令提示和當前你命令高亮
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
編輯配置而且apply一下
稍微好看了一點
同時找歷史命令也不用按ctrl+r ,直接打命令就能夠了
git 插件
命令內容能夠參考 cat ~/.oh-my-zsh/plugins/git/git.plugin.zsh。
經常使用的:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
autojump 插件
https://github.com/wting/autojump
yum install –y autojump-zsh # CentOS
brew install autojump # Mac
zshconfig配置下
還要配置下
[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh