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

Re: Preexec & Printf

On Thu, Apr 25, 2002 at 06:45:52PM -0700, Bart Schaefer wrote:
> On Thu, 25 Apr 2002, Joshua Symons wrote:
> > I had seen q in the modifier list @
> > http://zsh.sourceforge.net/Doc/Release/zsh_13.html#SEC45
> > I don't see V and z in the modifier list, are they documented?
> Unfortunately that's still the 3.0 -- or perhaps it's 3.1.6 --
> documentation.  You need to read the docs that came with your zsh
> distribution if you want accurate information.

No, it is the 4.0.3 documentation. The reason that V and z are not in
the list of modifiers is that they are parameter expansion flags so
are listed further down in the documentation. #SEC47 or 13.3.1 if
looking on the web page.

As for the original question, I'd have thought it'd be easier to
break up the print statement in preexec to avoid it interpreting
any back-slashes in $1. e.g:
preexec() {
  print -Pn "\e]0;%m:%l - "
  print -rn "${(V)1}"
  print -n "\a"

It still needs the V flag for special characters but shouldn't need
any quoting.


This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.

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