Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Proof of concept: "static" parameter scope
Bart Schaefer wrote on Mon, Oct 05, 2015 at 15:17:39 -0700:
> On Oct 5, 9:55pm, Daniel Shahaf wrote:
> }
> } Related issue:
> }
> } % disable -r local
> } % zxxx() { local x=(a b c); print $x }
> } % enable -r local
> } % which zxxx
> } zxxx () {
> } local x=(a b c)
> } print $x
> } }
> }
> } Should it output 'builtin local x=(a b c)'?
>
> No, we don't want to go down that road, because "disable local" doesn't
> (shouldn't) cause it to start emitting "command local" either.
>
Okay, I understand the consistency point, but could you explain why
"disable local" shouldn't emit "command local"?
I'm not saying it should do something else; I'm just trying to understand
why the modifier ('builtin' or 'command') should be output in neither case.
> However, it is worth noting that it's now necessary to disable BOTH the
> keyword AND the corresponding builtin if you actually want to find an
> external command named "local" by default.
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author