1
0
Fork 0

Added 'fast' style of prompt without git

pull/340/head
huyz 12 years ago
parent 1ced7809a6
commit a4d4671372

@ -147,10 +147,11 @@ function prompt_progressive_setup {
case "$1" in case "$1" in
0) style=bare ;; 0) style=bare ;;
1) style=minimal ;; 1) style=minimal ;;
3) style=unabbreviated ;; 2) style=fast ;; # Default
4) style=multiline ;; 3|) style=concise ;; # Default
5) style=verbose ;; 4) style=unabbreviated ;;
2|) style=concise ;; 5) style=multiline ;;
6) style=verbose ;;
*) *)
print -P "Unrecognized style '%F{blue}$style%f'." >&2 print -P "Unrecognized style '%F{blue}$style%f'." >&2
style=concise style=concise
@ -181,6 +182,11 @@ function prompt_progressive_setup {
### Define prompt ### 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 if [[ $style == bare ]]; then
PS1='%# ' PS1='%# '
RPS1='' RPS1=''
@ -219,7 +225,9 @@ function prompt_progressive_setup {
# Number of background jobs # Number of background jobs
P+="%1(j. %jJ.)" P+="%1(j. %jJ.)"
# Shell level if greater than 1 # 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 if [[ $style == (multiline|verbose) ]]; then
P+=" P+="

Loading…
Cancel
Save