X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/e7b57bc5c5383a6eac9b7d8d0af4f1c63723b948..57d22c7977ad80556aca28496d0192d4a72ef73a:/.zsh/themes/prompt_madduck_setup diff --git a/.zsh/themes/prompt_madduck_setup b/.zsh/themes/prompt_madduck_setup index 0b6dddc..69cff73 100644 --- a/.zsh/themes/prompt_madduck_setup +++ b/.zsh/themes/prompt_madduck_setup @@ -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}