article:
tag:
just test

其他 > centos PS1 上一篇 | 下一篇

linux, PS1, bash, bashrc

$ curl -L https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh > ~/.bash_git

And add this to the top of your ~/.bashrc:

source ~/.bash_git

PS1="\[\033[01;31;10m\]\u\[\033[1;36;10m\] \h\[\033[1;32;10m\]<\w>\[\033[1;37;10m\]$(__git_ps1 '(%s)')\n $\[\033[0m\] "

@suches
http://btbtd.com/mods/blog/item.php?uid=1&item=4989

发表于 @ 2018-12-08 10:39:02

该文章暂时没有回复
评论内容:
昵称:
验证码: