Hide error when cd-ing out of the git tree

This commit is contained in:
François Revol 2012-11-02 23:44:23 +01:00
parent 68c70f9b6d
commit 4373e37dd8
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ dev() {
test -n "$DEVUPCMD" && history -s "$DEVUPCMD" test -n "$DEVUPCMD" && history -s "$DEVUPCMD"
# spice up terminal window title for git, add current branch name # 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"' test -d .git && PROMPT_COMMAND='echo -en "\033]0;['$DEVPROJ':`git branch 2>/dev/null | sed "/^[^*]/d;s/^\*\s//"`:${PWD##*/}]\a"'
} }
complete -W complete -W "$(dev)" dev complete -W complete -W "$(dev)" dev