zsh #
oh-my-zsh #
安装
apt install -y git zsh
# sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
cat << 'EOF' >> ~/.zshrc
export PROMPT='%{$fg[magenta]%}%(?..%?%1v)%n@%{$fg[green]%}%M:%{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
EOF
zsh
# 使用 hostnamectl
hostnamectl set-hostname master1
alias cdcode='cd ~/code'
alias cdstudy='cdcode && cd study'
alias cdtest='cdstudy && cd test'
alias cdgithub='cdcode && cd github'
alias cdgitlab='cdcode && cd gitlab'
alias cdbitbucket='cdcode && cd bitbucket'
# proxy
# export http_proxy=149.28.137.166:20171
# export https_proxy=149.28.137.166:20171
# 设置默认为 zsh
sudo chsh -s /usr/bin/zsh yewang
Oh-my-zsh 主题乱码解决办法 #
cd ~/Downloads && git clone https://github.com/powerline/fonts.git #将 Powerline 字体文件下载到「下载」文件夹中
cd fonts && ./install.sh #安装所有 Powerline 字体
cd && rm -rf ~/Downloads/fonts #删除下载的字体文件
Iterm2 的设置路径是: [iTerm2] -> [Profiles] -> [Default] -> [Text] -> [Font] -> [DejaVu Sans Mono for Powerline]
叶王 © 2013-2024 版权所有。如果本文档对你有所帮助,可以请作者喝饮料。