链接: https://pan.baidu.com/s/1ZZnTDbVcg4A2NAu0gmBZIg
密码:关注公众号 【点九先生】 回复:iterm2 即可获得
macos下默认已经安装了zsh,可以直接使用
# 终端输入命令,然后输入密码即可将zsh切换成默认shell $ chsh -s /bin/zsh
sh -c “$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)”
sh -c “$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)”
git clone https://github.com/robbyrussell/oh-my-zsh
cd oh-my-zsh/tools sh install.sh
cd ~/.oh-my-zsh/themes sudo git clone https://github.com/romkatv/powerlevel10k.git
找到Downloads,直接下载 Hack 字体,别问我为什么,如果是mac,直接双击安装下载的字体即可安装,然后修改 oh my zsh 的变量文件 ~/.zshrc,修改变量 POWERLEVEL9K_MODE=‘nerdfont-complete’
链接: https://pan.baidu.com/s/1ZZnTDbVcg4A2NAu0gmBZIg
密码:关注公众号 【点九先生】 回复:iterm2 即可获得
cd ~/.oh-my-zsh/plugins
sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
sudo git clone git://github.com/zsh-users/zsh-autosuggestions
注意export ZSH="/Users/dianjiu/.oh-my-zsh"这里用户名dianjiu改成你的用户名
sudo vim ~/.zshrc
# Prompts
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0C0'
#POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0C0'
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0C2'
#POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0C2'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs virtualenv)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs command_execution_time ip)
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
POWERLEVEL9K_SHORTEN_DELIMITER=..
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=$'\n'
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="\uF460%F{073}\uF460%F{109}\uF460%f "
export ZSH="/Users/dianjiu/.oh-my-zsh"
POWERLEVEL9K_MODE='nerdfont-complete'
ZSH_THEME="powerlevel10k/powerlevel10k"
export UPDATE_ZSH_DAYS=13
HIST_STAMPS="yyyy/mm/dd"
plugins=(
git
colored-man-pages
colorize
github
brew
osx
docker
docker-compose
zsh-autosuggestions
zsh-syntax-highlighting
autopep8
python
)
source $ZSH/oh-my-zsh.sh
alias zshconfig="vim ~/.zshrc"
alias vimconfig="vim ~/.vimrc"
alias ansibleconfig="vim ~/.ansible/ansible.cfg"
alias grep='grep --color=auto'
source ~/.zshrc
Cloning into 'zsh-syntax-highlighting'... fatal: unable to access 'https://github.com/zsh-users/zsh-syntax-highlighting.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
问题解决
git config --global http.postBuffer 4194304000
sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
Password:
Cloning into 'zsh-syntax-highlighting'... remote: Enumerating objects: 6913, done. remote: Total 6913 (delta 0), reused 0 (delta 0), pack-reused 6913 Receiving objects: 100% (6913/6913), 1.45 MiB | 64.00 KiB/s, done. Resolving deltas: 100% (4675/4675), done.
在setting.json中新增
"terminal.integrated.fontFamily": "Hack Nerd Font",
手机扫一扫
移动阅读更方便
你可能感兴趣的文章