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

Re: PATCH: Add printing of the style to zstyle+ through option -p



On Wed, 16 Oct 2019 at 03:44, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Sebastian Gniazdowski wrote on Tue, 15 Oct 2019 18:57 +00:00:
> > I think that many of us often dreamed about omitting the output
> > parameter and the following print when checking out a value of style:
> >
> > zstyle -s :the:style:path style the_parameter; print $the_parameter
> >
> > I've stumbled upon the interesting function zstyle+ and I thought
> > about adding an option -p to it that would print the style:
> >
> > zstyle+ -p :the:style:path style
> >
> > The simple patch adds the option.
>
> Random idea, but how about a way to annotate a variable as "print
> a `set -x`-like diagnostic every time this variable is assigned to"?
> More or less like a gdb watchpoint.

Yes this is doable, from C - a chunk of code would have to be added to
the few standard parameter setters.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



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