Zsh 用户指引
配置
PROMPT
ZSH_THEME="ys"
VIRTUAL_ENV=(%B%F{77}'['$WSL_DISTRO_NAME']'%f%b)
高亮主机名
# For YS theme append to .zshrc
export PROMPT="
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
%(#,%{$bg[yellow]%}%{$fg[black]%}%n%{$reset_color%},%{$fg[cyan]%}%n) \
%{$reset_color%}@ \
%{$terminfo[bold]$fg[white]$bg[red]%}%m%{$reset_color%} \
%{$reset_color%}in \
%{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\
${hg_info}\
${git_info}\
${svn_info}\
${venv_info}\
\
[%*] $exit_code
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# jsdelivr CDN
curl -sS https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh/tools/install.sh | bash
# 中国镜像
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
# 插件 zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions