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

Re: Proof of concept: "static" parameter scope



On Oct 5, 10:36pm, Daniel Shahaf wrote:
}
} Okay, I understand the consistency point, but could you explain why
} "disable local" shouldn't emit "command local"?

The task of  which name / functions name / print -R $functions[name]
is to reproduce the text of the function, not its semantics.

Otherwise the next logical step would be for

    emulate zsh -c 'foo() { ... }'
    functions foo

to emit a "setopt" command along with the function definition.  Oh,
but why stop there?  I might have defined the function with all sorts
of setopts in effect, even if I didn't say "emulate" to make them
sticky.  Maybe those should be output as well ...



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