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

Re: PATCH: 3.1.5-pws-8: set -x output in [[ ... ]]



Peter Stephenson wrote:

> One thing that's a little odd is with conditions defined in modules.  Here,
> the arguments only undergo singsub() right at the last minute, so the
> strings printed out from the trace are untokenized versions of the
> unsubstituted strings.  Is there some reason why the words from such
> conditions shouldn't all undergo singsub() (thought not untokenize() since
> they may be patterns) before calling the handler in evalcond()?  If the
> condition arguments are always retrieved via cond_str(), cond_val() and
> cond_match(), this should have the same effect, since all three call
> singsub(), but I don't know if that's a warranted assumption.  If the idea
> is that sometimes a module condition may not want substitution performed,
> or may allow multi-word substitution, then we're stuck with always printing
> the unsubstituted form.

I just didn't want to assume that the words are always substituted,
giving modules more control. I don't know if this might be useful to
have, though (i.e. at least I could live with having the strings
always substituted).


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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