Skip to content

Instantly share code, notes, and snippets.

@ThaddeusJiang
Last active April 1, 2019 08:39
Show Gist options
  • Save ThaddeusJiang/4c9462ff80e27083e08d49427265247f to your computer and use it in GitHub Desktop.
Save ThaddeusJiang/4c9462ff80e27083e08d49427265247f to your computer and use it in GitHub Desktop.
修改 Mac Terminal 前缀

修改 Mac 终端, 隐藏主机名和用户名

让你的 Terminal 变得干净,简洁。

vim ~/.bash_profile

export PS1="\W \$ "

附:

\h 主机名
\W 路径 
\u 用户名 
\$ $

add git branch name

export PS1="\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] \$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment