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

Re: Quoting in zsh -x output

Hrvoje Niksic wrote:
> I suggest modifying the zsh `-x' output to quote its arguments the way
> Bash does.  What do the others think?

This would be nice, but it's not a trivial change.  The xtrace output is
done at the last minute after quoting information has been stripped.
This is deliberate, in order to output exactly what is being evaluated
after all substitutions, which is the information you can't get any
other way.  This is at odds with showing all the quotes.  It's possible
there's some compromise position which would show a lot of everything
--- the quotes get stripped at quite a late stage.  However, there's no
way of doing it perfectly without a great deal of work --- consider
expansions like "$@".

You could try the `verbose' option, which works at the input end of the
command chain.

(In case anybody assumes otherwise, I have zero time to work on this
myself for the foreseeable future.)

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

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