first method for current branch
add virtualenv
This commit is contained in:
parent
6f1c6f9887
commit
da12302f5d
4
.bashrc
4
.bashrc
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
parse_git_branch() {
|
parse_git_branch() {
|
||||||
git branch --show-current 2> /dev/null
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -26,4 +26,4 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# last
|
# last
|
||||||
PS1="\n$prompt_color┌──($close_color$info_color\u$prompt_symbol\H$close_color$prompt_color)-[$close_color\w$prompt_color]$close_color $red_color\$(parse_git_branch)$close_color\n$prompt_color└─$close_color$info_color$end_symbol$close_color "
|
PS1="\n$prompt_color┌─${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}─($close_color$info_color\u$prompt_symbol\H$close_color$prompt_color)-[$close_color\w$prompt_color]$close_color $red_color\$(parse_git_branch)$close_color\n$prompt_color└─$close_color$info_color$end_symbol$close_color "
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user