From a4d4671372f560bd6d48eed96c3b39e1fb868a38 Mon Sep 17 00:00:00 2001 From: huyz Date: Wed, 12 Dec 2012 23:23:41 -0800 Subject: [PATCH] Added 'fast' style of prompt without git --- .../prompt/functions/prompt_progressive_setup | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/prompt/functions/prompt_progressive_setup b/modules/prompt/functions/prompt_progressive_setup index b7d35096..c1762571 100644 --- a/modules/prompt/functions/prompt_progressive_setup +++ b/modules/prompt/functions/prompt_progressive_setup @@ -147,10 +147,11 @@ function prompt_progressive_setup { case "$1" in 0) style=bare ;; 1) style=minimal ;; - 3) style=unabbreviated ;; - 4) style=multiline ;; - 5) style=verbose ;; - 2|) style=concise ;; + 2) style=fast ;; # Default + 3|) style=concise ;; # Default + 4) style=unabbreviated ;; + 5) style=multiline ;; + 6) style=verbose ;; *) print -P "Unrecognized style '%F{blue}$style%f'." >&2 style=concise @@ -181,6 +182,11 @@ function prompt_progressive_setup { ### Define prompt + # Remove the git hooks for some levels of hooks + if [[ $style == (bare|minimal|fast) ]]; then + add-zsh-hook -d precmd prompt_progressive_precmd + fi + if [[ $style == bare ]]; then PS1='%# ' RPS1='' @@ -219,7 +225,9 @@ function prompt_progressive_setup { # Number of background jobs P+="%1(j. %jJ.)" # Shell level if greater than 1 - P+="%(2L/ L1/)" + # Hmm, which one is correct? + #P+="%(2L/ L1/)" + P+="%(2L/ L%L/)" if [[ $style == (multiline|verbose) ]]; then P+="