From: martin f. krafft Date: Fri, 12 Jun 2009 15:01:12 +0000 (+0200) Subject: use ellipsis in git preprompt X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/bc70f8fe56ee3aa16ac7a65b7777e115efda1c33?ds=sidebyside use ellipsis in git preprompt --- diff --git a/.zsh/zshrc/60_vcsprompt b/.zsh/zshrc/60_vcsprompt index aeabd77..d12f686 100644 --- a/.zsh/zshrc/60_vcsprompt +++ b/.zsh/zshrc/60_vcsprompt @@ -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 }