dev-perso: Add current branch name in window title for git
* when the project uses git, include the current branch name in the terminal window title
This commit is contained in:
parent
b9398be907
commit
70449c90d9
3
3rdparty/mmu_man/scripts/dev-perso
vendored
3
3rdparty/mmu_man/scripts/dev-perso
vendored
@ -162,6 +162,9 @@ dev() {
|
||||
test -z "$DEVUPCMD" -a \( -f _FOSSIL_ -o -f .fslckout \) && DEVUPCMD="fossil update"
|
||||
test -z "$DEVUPCMD" -a -n "$P4PORT" && DEVUPCMD="p4 sync"
|
||||
test -n "$DEVUPCMD" && history -s "$DEVUPCMD"
|
||||
|
||||
# spice up terminal window title for git, add current branch name
|
||||
test -d .git && PROMPT_COMMAND='echo -en "\033]0;['$DEVPROJ':`git branch | sed "/^[^*]/d;s/^\*\s//"`:${PWD##*/}]\a"'
|
||||
}
|
||||
|
||||
complete -W complete -W "$(dev)" dev
|
||||
|
Loading…
Reference in New Issue
Block a user