MacOS 的终端利器 iTerm2

参考:

https://www.cnblogs.com/xishuai/p/mac-iterm2.html

如若修改用户名,修改:

一般终端每一行前都会有xxx@xxxdeMacbook-Pro:我们可以将其隐藏掉。
进入oh-my-zsh的agnoster主题,编辑agnoster.zsh-theme文件:

vim ~/.oh-my-zsh/themes/agnoster.zsh-theme

  在vim中修改的内容是:

  # Context: user@hostname (who am I and where am I)
  prompt_context() {
    if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
     prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m"-----将该行 注释( prompt 前面 加 " # " ) 即可

  

还遇到的一个问题是:之前安装的python3虚拟环境无法使用,则可以将原来配置文件写下zshrc中,如下示:

source  ~/.bash_profile
原文地址:https://www.cnblogs.com/abella/p/12106398.html