chiark / gitweb /
Release 0.14
[stgit] / contrib / stgbashprompt.sh
index f4817a12a698ec4c88722ee344313d400a5ca9ed..5927e679e5c676376f580331552632a72e4b2a0b 100755 (executable)
@@ -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