您现在的位置是:首页 > 在macOS10.15下面安装配置oh my zsh

在macOS10.15下面安装配置oh my zsh

默认 2019-10-25 23:33 1597人围观 来源:原创
zsh  
简介众所周知macOS10.15里已经将zsh作为默认bash了,那么基于zsh可以通过安装oh my zsh来美化并且扩展功能。

最终效果图:

chsh -s /bin/zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sudo easy_install pip
pip install powerline-status --user
cd ~/Desktop
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts&&./install.sh
git clone https://github.com/altercation/solarized
open .solarized/osx-terminal.app-colors-solarized
双击里面的两个.terminal文件完成安装
cd ~
vim ~/.zshrc

如下图修改主题:

修改完成后按一下esc调出vi命令,输入:wq保存并退出vi模式。

此时command+Q或source配置文件后,终端变了模样:

cd ~/.oh-my-zsh/custom/plugins/
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
git clone https://github.com/zsh-users/zsh-autosuggestions
brew install autojump
vim ~/.zshrc

找到类似下面的代码替换

plugins=(                                                                     
   git                                                                         
   autojump                                                                    
   zsh-autosuggestions                                                         
   zsh-syntax-highlighting                                                     
 )                                                                             

 source $ZSH/oh-my-zsh.sh                                                      
 source ~/.bash_profile
我的博客即将同步至腾讯云开发者社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=3cn0udci9ym88

文章评论