1.在 ~/.zshrc 中添加
1 | source ~/.bash_profile |
参考:https://blog.csdn.net/qq_18505715/article/details/83276208
2.比如mac的git命令补全不生效,可以参考如下文章添加
https://blog.csdn.net/WinWill2012/article/details/71774461
1 | source ~/.git-completion.bash |
3.调整mac终端颜色和全路径显示
1 | export PS1="%n@%m %0~ $ " |
如果安装的oh my zsh,那么修改全路径显示的方式是
1 | vim ~/.oh-my-zsh/themes/robbyrussell.zsh-theme |
修改成
1 | #PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' |
就会变成
4.Big Sur在使用mvn package的时候回遇到
1 | No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? |
解决方法是在~/.bash_profile中加入
1 | #java |
5.iterm2连接远程终端中文乱码,在 ~/.zshrc 中添加
1 | export LANG='UTC-8' export LC_ALL='en_US.UTF-8' |
然后
1 | source ~/.zshrc |
6.oh my zsh添加提示插件
1 | https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md |