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

Re: Let's finish this new completion stuff



"Matt Armstrong" wrote:
> The thing that'd help me understand most is an easy way to see a 
> function call trace when __complete_expand-or-complete and friends get 
> called.  Is something like that possible?

You can use set -x (aka setopt xtrace), that's the main reason I've
enhanced it to trace conditions, function calls and arithmetic evaluations.
I've been using it a lot myself.  There are two problems: it messes up the
display, so it's hard to see what's happening, though if you're just
listing a completion it's not so bad since all the trace information is
above and you can still read the list.  You may be able to `exec
2>xtrace.log' since the tty is maintained separately (if it doesn't work,
it's probably a bug).  Note you can change PROMPT4, which escaped me until
the weekend.

Secondly (if it's a problem) set -x is different from ksh in that ksh turns
it off inside a function where it's not explicitly set, which zsh doesn't,
so you maybe get more info than you want.  (Does anybody think this should
be altered?  I think it's trivial to do that.  `emulate zsh' doesn't change
xtrace, but `emulate -R zsh' does, but even so you get everything up to and
including the emulate statement.)  `setopt localoptions [no]xtrace' does
work, of course.

-- 
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