On Sat, May 31, 2008 at 06:21:35PM +0100, Stephane Chazelas wrote:
> $ local() { echo a; }
> $ local a
> $ "local" a
> $
[...]
> Anyway, the above breaks POSIX conformance I think. POSIX only
> allows "select" and "function" as possible non-standard
> keywords.

"local" was incorrectly marked as a special built-in, since
it was intended to behave similarly to export/readonly.

> If "local" were a keyword in posh, I would expect the first line
> above to give an error and the 3rd line to output "a\n".

It's not a keyword, it's a builtin; what is your basis for the
quoting behavior?

> Note that given that "local" is not POSIX and can be written as
> a POSIX shell function with little effort if need be, it
> shouldn't be needed as a builtin, IMO.

Hardcoding such a function definition into the shell seems less
robust than as a builtin.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to