X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/e7b57bc5c5383a6eac9b7d8d0af4f1c63723b948..a6e7465221b0ad713b1d2417881129d969b4644b:/.zsh/themes/prompt_madduck_setup?ds=inline diff --git a/.zsh/themes/prompt_madduck_setup b/.zsh/themes/prompt_madduck_setup index 0b6dddc..100ce87 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} @@ -363,7 +363,7 @@ function make_rps1() { echo -n '%D{%d %H:%M:%S.%.}' echo } -RPS1=$(make_rps1) +typeset -g RPS1="$(make_rps1)" unfunction make_rps1 # vim:ft=zsh