1. 安装
yum -y install zsh
chsh -s /bin/zsh
zsh
sh -c "$(wget https://raw.githubusercontent.com/brinkqiang/oh-my-zsh/master/tools/install.sh -O -)"
选择主题
https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-history-substring-search.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
plugins=(
git tmux github yum dnf systemd autojump history zsh-history-substring-search zsh-autosuggestions zsh-syntax-highlighting
)
2. 更新
upgrade_oh_my_zsh
3. 快捷
Oh-My-Zsh Git Aliases
enable (git) plugin.
g git gst git status
gl git pull gup git fetch && git rebase
gp git push gc git commit -v
gca git commit -v -a gco git checkout
gcm git checkout master gb git branch
gba git branch -a gcount git shortlog -sn
gcp git cherry-pick glg git log --stat --max-count=5
glgg git log --graph --max-count=5 gss git status -s
ga git add gm git merge
grh git reset HEAD grhh git reset HEAD --hard
gsr git svn rebase gsd git svn dcommit
ggpull git pull origin $(current_branch)
ggpush git push origin $(current_branch)
gdv git diff -w "$@" | view -
ggpnp git pull origin $(current_branch) && git push origin $(current_branch)
git-svn-dcommit-push git svn dcommit && git push github master:svntrunk
gpa git add .; git commit -m "$1"; git push; # only in the ocodo fork.
4. zsh配置错误导致用户无法登陆解决办法
使用命令行ssh -p port user@ip -t “/bin/bash”