参考以下链接:

https://gist.github.com/justintv/168835

 

vim ~/.bash_profile
编辑profile文件, 修改PS1

# vim ~/.bash_profile
#//在此文件中插入下面这句
export PS1="\\u@windows:\w\$(__git_ps1 '(%s)')\$ "
编辑完成保存后, 执行

source ~/.bash_profile

 

具体配置如下:

export PS1="\[\e[37;40m\]\[\e[32;40m\]\u\[\e[37;40m\]@\W\[\e[33;40m\]\$(__git_ps1 ['%s'])\[\e[32;40m\]\$\[\e[0m\] "

相关文章:

  • 2021-09-25
  • 2023-02-05
  • 2021-07-05
  • 2021-06-30
  • 2022-12-23
  • 2021-11-13
  • 2021-12-23
  • 2022-02-09
猜你喜欢
  • 2021-11-11
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案