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

Re: prevent some lines directly coming from the history from being executed



On Sun, May 29, 2022 at 3:55 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Bart Schaefer wrote on Sat, 28 May 2022 18:43 +00:00:
> > On Sat, May 28, 2022 at 3:06 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >> +cindex(widgets, shadowing standard)
> >
> > "Shadow(ing)" is not a term I'd think to search for in this context.
>
>  [...] I think "shadow" is the right term
> here, so how about:
>
> +cindex(widgets, shadowing standard)
> +cindex(widgets, overriding standard)

By comparison to a number of other index entries, I think

standard widgets, shadowing
standard widgets, overriding

Or even

widgets, standard, shadowing
widgets, standard, overriding

would fit the pattern better.

> +User-defined widgets may shadow (override) standard widgets: for instance,
>
> >> +However, each standard widget `var(foo)' is also available under the
> >
> > I would probably have used something like var(std)
>
> Personally I find it easier to read with "foo", but I suppose that's
> a matter of taste.  I'll write it whichever way is the house style.

There are plenty of "foo" already in the doc, so as you prefer.

> >> +Therefore, for forward compatibility with future versions of the shell,
> >> +it is recommended that user-defined widgets should not have names
> >>  starting with `tt(.)'.
> >
> > It's actually prohibited to name a user-defined widget the same as one
> > of the reserved dot-names, so this recommendation could be more
> > specific.
>
> OK, can spell out the problem.  Wouldn't that make the paragraph a bit
> of a wall of text, though?  Also, it would further break the flow

Hm.  How about, picking up after
+This makes the standard widget available to be called or bound even when
+its usual name has been redefined.

These names are reserved and cannot be created as user-defined
widgets, so for compatibility with possible future revisions of the
shell, it is recommended that users avoid naming widgets with a
leading `tt(.)'.




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