Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: precmd, preexec, and supplied prompt themes
- X-seq: zsh-users 12008
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: precmd, preexec, and supplied prompt themes
- Date: Sat, 13 Oct 2007 19:49:29 -0700
- In-reply-to: <43237.69.3.24.27.1192318777.squirrel@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <DD973F2C-E6A0-4FCA-96F5-6C96701DC677@xxxxxxxxxxxxxxxxxx> <20071012215906.GA8935@mastermind> <071012185005.ZM2921@xxxxxxxxxxxxxxxxxxxxxx> <35490.69.3.191.19.1192241340.squirrel@xxxxxxxxxxxxxxxxx> <071012202721.ZM13638@xxxxxxxxxxxxxxxxxxxxxx> <20071013135858.18e842df.wgscott@xxxxxxxxxxxxxxxxxx> <071013144046.ZM15536@xxxxxxxxxxxxxxxxxxxxxx> <42409.66.167.127.82.1192312408.squirrel@xxxxxxxxxxxxxxxxx> <071013161113.ZM15656@xxxxxxxxxxxxxxxxxxxxxx> <43237.69.3.24.27.1192318777.squirrel@xxxxxxxxxxxxxxxxx>
On Oct 13, 4:39pm, William Scott wrote:
}
} Sorry for opening this can of worms...
It probably needed opening.
Index: Functions/Prompts/promptinit
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Functions/Prompts/promptinit,v
retrieving revision 1.3
diff -c -r1.3 promptinit
--- promptinit 1 Oct 2006 02:38:52 -0000 1.3
+++ promptinit 14 Oct 2007 02:47:52 -0000
@@ -39,6 +39,7 @@
}
prompt_preview_safely() {
+ emulate -L zsh
print $reset_color
if [[ -z "$prompt_themes[(r)$1]" ]]; then
print "Unknown theme: $1"
@@ -165,6 +166,7 @@
}
prompt () {
+ emulate -L zsh
local prompt_opts
set_prompt "$@"
@@ -176,6 +178,7 @@
}
prompt_preview_theme () {
+ emulate -L zsh
local -a psv; psv=($psvar); local -a +h psvar; psvar=($psv) # Ick
local +h PS1=$PS1 PS2=$PS2 PS3=$PS3 PS4=$PS4 RPS1=$RPS1
trap "${$(functions precmd):-:} ; ${$(functions preexec):-:}" 0
@@ -184,10 +187,10 @@
(( $#* > 1 )) && print -n " with parameters \`$*[2,-1]'"
print ":"
prompt_${1}_setup "$@[2,-1]"
- precmd
+ typeset +f precmd >&- && precmd
[[ -o promptcr ]] && print -n $'\r'; :
print -P "${PS1}command arg1 arg2 ... argn"
- preexec
+ typeset +f preexec >&- && preexec
}
[[ -o kshautoload ]] || promptinit "$@"
--
- References:
- precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
- Re: precmd, preexec, and supplied prompt themes
Messages sorted by:
Reverse Date,
Date,
Thread,
Author