]> git.donarmstrong.com Git - zsh.git/commitdiff
use ellipsis in git preprompt
authormartin f. krafft <madduck@madduck.net>
Fri, 12 Jun 2009 15:01:12 +0000 (17:01 +0200)
committermartin f. krafft <madduck@madduck.net>
Fri, 12 Jun 2009 15:01:12 +0000 (17:01 +0200)
.zsh/zshrc/60_vcsprompt

index aeabd7744054d431ec6e7f93a2ce7009af9d3d3e..d12f686c2531f618d46ce8bfd88493b5ad902ea9 100644 (file)
@@ -38,12 +38,12 @@ __git_print_preprompt()
   output=(${(f):-"$(git diff --stat --relative 2>/dev/null)"})
   if [[ ${#output} -gt 1 ]]; then
     echo changes on filesystem:
-    print "${(F)output[1,-2]}"
+    print "${${(F)output[1,-2]}//\.\.\./…}"
   fi
   output=(${(f):-"$(git diff --cached --stat --relative 2>/dev/null)"})
   if [[ ${#output} -gt 1 ]]; then
     echo cached/staged changes:
-    print "${(F)output[1,-2]}"
+    print "${${(F)output[1,-2]}//\.\.\./…}"
   fi
 }