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

Re: PATCH: Add `sourcetrace' option



Peter Stephenson writes:
> Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
>> Here's an updated patch. Thanks to everyone who reviewed the previous
>> attempts.
>
> I'm just toying with this variant...  the difference is this moves the
> output down until after the script name etc. is set up, and uses PS4
> (like the xtrace option), so the output is more configurable.  For
> example, I get:
>
> +/etc/zshenv:1> <sourcetrace>
> +/home/pws/.zshenv:1> <sourcetrace>
> +/home/pws/.profile:1> <sourcetrace>
> +/home/pws/.zshrc:1> <sourcetrace>
> /home/pws/.aliasrc:1:> <sourcetrace>
> /home/pws/.compinstall:1:> <sourcetrace>
> /home/pws/.zcompdump_4.3.10-dev-1_pws:1:> <sourcetrace>
>
> (the change in the middle is because I tweak PS4 to remove the "+" in
> .zshrc, for no good reason I can now think of, as well as adding %_, and
> there's only one global file because .zshenv sets NO_GLOBAL_RCS.)
>
> I'm not particularly set on this but it seems more powerful without
> losing anything obvious.  The documentation would need tweaking.

Certainly preferable. Would the documentation really need updating? The
entry for `XTRACE' doesn't mention $PS4 either. And the overall
behaviour doesn't differ from my initial approach, does it?

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



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