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