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

Re: zsh-3.1.5-pws-12: emulate -RL resets -x option



"Andrej Borsenkow" wrote:
> Just found when debugging completion function. emulate -RL is the last line
> I see after entering the function

That's because it restores the option xtrace to the default value (off).
You have to set it explicitly in that function, or test it before the
`emulate' and then restore it after.  If you don't want so many options
set, drop the `-R' to emulate, so that it will only change basic syntatic
features.  Arguably that's the right thing to do in completion functions
anyway, since you're supposedly relying on using the user's current
interactive environment, and only making sure the syntactic features work
properly, i.e. we're all too paranoid.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



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