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

Re: PATCH: Don't define internal params directly in hook function scope



On Wed, 29 Apr 2015 21:01:40 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Apr 30,  2:08am, Mikael Magnusson wrote:
> }
> } Something feels very wrong about this :). I'm not committing it.
> 
> I prefer the original approach, if only because it means you have to
> think about what you're doing before mucking with things that are
> read-only for a reason.
> 
> (I believe the answer about adding a new level of scope around the
> "local -h" has appeared on zsh-users before, though I can't think of
> a good search term to find it.)

Documenting this is probably a reasonable approach.  Adding a nested
function in the odd case where you need it probably isn't a big issue,
as long as people know.

pws



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