]> git.madduck.net Git - etc/zsh.git/blobdiff - .zsh/themes/prompt_madduck_setup

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Minor fixes to accomodate Zsh4
[etc/zsh.git] / .zsh / themes / prompt_madduck_setup
index 0b6dddcbdadcc073c2d000639617056c6b86ee6b..69cff7331402b9c34e0be89460ae3c58426841ad 100644 (file)
@@ -59,7 +59,7 @@ __git_print_preprompt()
   function output() {
     emulate -L zsh
     local title="$@"
-    local output=(${(f)"$(cat)"})
+    local output; output=(${(f)"$(cat)"})
 
     [[ ${#output} -ge 1 ]] || return
 
@@ -81,8 +81,8 @@ __git_print_preprompt()
     eval git diff $common_options "$@" 2>/dev/null
   }
 
-  local cached=(${(f)"$(gitdiffstat --cached | output cached)"})
-  local changed=(${(f)"$(gitdiffstat | output changed)"})
+  local cached; cached=(${(f)"$(gitdiffstat --cached | output cached)"})
+  local changed; changed=(${(f)"$(gitdiffstat | output changed)"})
 
   local max=${#changed}
   [[ $max -lt ${#cached} ]] && max=${#cached}