On Sun, Jun 01, 2008 at 12:11:39PM +0100, Stephane Chazelas wrote:
> then, posh has another problem with the other special builtins.
> As far, as I can tell, POSIX doesn't say that special builtin
> names can't be used as functions.

It says that the command search order is special builtins, then
functions, then regular builtins, then non-built-in commands.

> If posh doesn't allow it, it should report an error on the
> function declaration like ash or ksh93 IMO.

That seems reasonable to me right now.

> > It's not a keyword, it's a builtin; what is your basis for the
> > quoting behavior?
> 
> keywords are only recognised as keywords when not quoted as the
> quote removal is performed after the recognition of keywords.

Again, "local" is not a reserved word or keyword.

> I meant that encouraging people to write non-portable scripts by
> using the non-POSIX "local" was a bad idea given that there are
> POSIX alternatives to it. That is, script-writer can implement
> their own version of "local" (which will be more portable as the
> behavior of the built-in equivalent vary from shell to shell and
> can be used is other places than just functions) in the unlikely
> event they really need local scope in a sh shell script and
> still be portable. But the same goes for "echo -n". I don't see
> the point, given that there is a standard alternative,
> especially when you consider how unportable echo is.

The point is to accommodate existing scripts rather than having
people fix them (which seems to make them very angry and confused
for no apparent reason).

This particular issue would more productively be discussed in a
bug on the debian-policy package or on the
[EMAIL PROTECTED] mailing list.



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

Reply via email to