X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/330c6aff37039f746215d9e293a282dc87e7f080..refs/tags/v0.13:/contrib/stgbashprompt.sh?ds=sidebyside diff --git a/contrib/stgbashprompt.sh b/contrib/stgbashprompt.sh index f4817a1..5927e67 100755 --- a/contrib/stgbashprompt.sh +++ b/contrib/stgbashprompt.sh @@ -9,8 +9,8 @@ if [ "$PS1" ]; then ref=$(git-symbolic-ref HEAD 2> /dev/null) || return br=${ref#refs/heads/} top=$(tail -n 1 $git_dir/patches/$br/applied 2>/dev/null) \ - && top="/$top"; - echo "[$br$top]" + top=${top:-(none)} + echo "[$top@$br]" } PS1='\u@\h:$(__prompt_git)\W\$ ' fi