Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Preexec & Printf



From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
Date: Thursday, April 25, 2002 8:01 pm
Subject: Re: Preexec & Printf

> On Thu, 25 Apr 2002, Joshua Symons wrote:
> 
> > I have a pretty generic problem, but I can't seem to make my way 
> around> it.
> 
> Re-read the documentation for the preexec function.  In particular:
> 
> > preexec () {
> >         print -Pn "\e]0;%m:%l   -   $* \a"
> > }
> 
> You almost certainly want to refer to $1 rather than to $*.  To 
> remove the
> quotes from the string, you probably want to use ${(z)1}.
> 
> > $ZSH_VERSION = 3.1.9
> 
> You might also want to upgrade to zsh 4.0.4, which has been out for a
> while now.
> 
> 

Same results:
[(ichirou:151:pts/33)~ %] which preexec
preexec () {
        print -Pn "\e]0;%m:%l   -   ${(z)1} \a"
}
[(ichirou:152:pts/33)~ %] printf '^[[32;40mwith quotes\n' 
[32;40mwith quotes
' with quotes
[(ichirou:153:pts/33)~ %] unfunction preexec
[(ichirou:154:pts/33)~ %] printf '^[[32;40mwith quotes\n' 
with quotes

Additionally, I will upgrade to 4.0.4 as well, but I don't believe that
will fix this current issue.

-Josh-



Messages sorted by: Reverse Date, Date, Thread, Author