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 Sat, May 28, 2022 at 3:06 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> How about the following?  I think the new text has a lot of room for
> improvement, so feedback's very welcome.

Generally very good.  Just a couple of thoughts:

> +cindex(widgets, shadowing standard)

"Shadow(ing)" is not a term I'd think to search for in this context.
Wrap, override, overload, replace, re-implement, ...?

> +However, each standard widget `var(foo)' is also available under the
> +name `tt(.)var(foo)', and this name can't be rebound to a different widget.

I would probably have used something like var(std) or even
var(stdwidg) here, but that's a nit.

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

> +then tt(myfunc) would have been called again, effecting a bottomless
> +recursion.

Perhaps my old-fogey-ness (or USA-centrism) is showing, but I've never
seen the word "bottomless" used in this context before, only
"infinite" or more rarely "endless".  Another nit, as it doesn't
really change the clarity, just mentioning because I found it curious.

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