1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-18 15:21:16 +02:00

zsh-workers/8271

This commit is contained in:
Tanaka Akira 1999-10-15 09:38:21 +00:00
parent e14b3b1821
commit df3478da4e
4 changed files with 6 additions and 5 deletions

View file

@ -4,7 +4,7 @@ prompt_adam2_help () {
cat <<'EOF' cat <<'EOF'
This prompt is color-theme-able. You can invoke it thus: This prompt is color-theme-able. You can invoke it thus:
prompt adam2 [ simple ] <color1> <color2> <color3> prompt adam2 [ plain ] <color1> <color2> <color3>
where the colors are for the hyphens, current directory, and user@host where the colors are for the hyphens, current directory, and user@host
bits respectively. bits respectively.
@ -70,7 +70,7 @@ prompt_adam2_setup () {
prompt_char="%(!.#.>)" prompt_char="%(!.#.>)"
precmd () { prompt_adam2_precmd } precmd () { prompt_adam2_precmd; setopt promptsubst }
preexec () { prompt_adam2_preexec } preexec () { prompt_adam2_preexec }
} }

View file

@ -21,7 +21,7 @@ prompt_fire_setup () {
PS1=$COLOR1$GRAD1$COLOR2'%n@%m'$COLOR3$GRAD2$COLOR4$GRAD1$COLOR6' %D{%a %b %d} %D{%I:%M:%S%P} '$NONE'$prompt_newline'$COLOR5'%~/'$GRAD0' ' PS1=$COLOR1$GRAD1$COLOR2'%n@%m'$COLOR3$GRAD2$COLOR4$GRAD1$COLOR6' %D{%a %b %d} %D{%I:%M:%S%P} '$NONE'$prompt_newline'$COLOR5'%~/'$GRAD0' '
PS2=$COLOR1$GRAD1$COLOR3$GRAD2$COLOR4$GRAD1$COLOR5'>'$GRAD0' ' PS2=$COLOR1$GRAD1$COLOR3$GRAD2$COLOR4$GRAD1$COLOR5'>'$GRAD0' '
precmd () { } precmd () { setopt promptsubst }
preexec () { } preexec () { }
} }

View file

@ -6,7 +6,7 @@ prompt_redhat_setup () {
PS1="[%n@%m %1~]\\$ " PS1="[%n@%m %1~]\\$ "
PS2="> " PS2="> "
precmd () { } precmd () { setopt promptsubst }
preexec () { } preexec () { }
} }

View file

@ -35,6 +35,7 @@ promptinit () {
} }
prompt () { prompt () {
emulate -L zsh
local opt preview theme usage old_theme local opt preview theme usage old_theme
usage='Usage: prompt <options> usage='Usage: prompt <options>
@ -91,7 +92,7 @@ Options:
print "$usage" print "$usage"
return return
fi fi
prompt_$1_setup "$*[2,-1]" prompt_$1_setup $*[2,-1]
prompt_theme=( $* ) prompt_theme=( $* )
# Avoid screwing up the environment listing # Avoid screwing up the environment listing