Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: promptinit
- X-seq: zsh-workers 8271
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: promptinit
- Date: Fri, 15 Oct 1999 08:43:20 +0000
- In-reply-to: <199910141300.PAA14858@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199910141300.PAA14858@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Oct 14, 3:00pm, Sven Wischnowsky wrote:
} Subject: PATCH: promptinit
}
} ... or did I miss a patch?
Here are some other misc. fixes ... I don't know whether some of these
might be better handled by changing the perl prompt converter script ...
Also, I really don't like having my precmd stomped on, but I haven't yet
gotten around to fixing that.
Index: Functions/Prompts/prompt_adam2_setup
===================================================================
@@ -4,7 +4,7 @@
cat <<'EOF'
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
bits respectively.
@@ -70,7 +70,7 @@
prompt_char="%(!.#.>)"
- precmd () { prompt_adam2_precmd }
+ precmd () { prompt_adam2_precmd; setopt promptsubst }
preexec () { prompt_adam2_preexec }
}
Index: Functions/Prompts/prompt_fire_setup
===================================================================
@@ -21,7 +21,7 @@
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' '
- precmd () { }
+ precmd () { setopt promptsubst }
preexec () { }
}
Index: Functions/Prompts/prompt_redhat_setup
===================================================================
@@ -6,7 +6,7 @@
PS1="[%n@%m %1~]\\$ "
PS2="> "
- precmd () { }
+ precmd () { setopt promptsubst }
preexec () { }
}
Index: Functions/Prompts/promptinit
===================================================================
@@ -35,6 +35,7 @@
}
prompt () {
+ emulate -L zsh
local opt preview theme usage old_theme
usage='Usage: prompt <options>
@@ -91,7 +92,7 @@
print "$usage"
return
fi
- prompt_$1_setup "$*[2,-1]"
+ prompt_$1_setup $*[2,-1]
prompt_theme=( $* )
# Avoid screwing up the environment listing
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author