Re: [BUG] Illegal function names are accepted after being used as aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/02/2016 20:33, Eric Blake wrote:
exit - fuzzy.  exit is a special built-in (unlike getopts); and XCU 2.14
states:

  "Some of the special built-ins are described as conforming to XBD
Utility Syntax Guidelines. For those that are not, the requirement in
Utility Description Defaults that "--" be recognized as a first argument
to be discarded does not apply and a conforming application shall not
use that argument. "

Conforming apps cannot expect 'exit -1' to work, and therefore, cannot
also expect 'exit -- -1' to work, since the only standards-defined
values for an argument to exit is a non-negative decimal integer less
than 256.  Of course, if you want to fix it along with all the others,
that's fine; I'm just pointing out that 'exit' isn't broken as-is.

I was under the impression that the intent from the dash side was to handle all commands the same, and that impression was based on the fact that the . command has received additional code to handle -- even though there's no requirement for that. However, looking into the original bug report that prompted that change in more detail I see that the standard will very likely require support for -- in the . command in the future, so that doesn't hold up.

If that intent isn't there (I'm not saying it's not; I'm unsure now), the list of utilities that should be extended is far smaller, if I'm not overlooking anything:
- alias
- getopts
- type
- exec?
- local?

exec is like .: there's currently no requirement to support --, but that requirement is likely to come in the future.

local is currently non-standard and it's hard to guess whether it will require support for -- if standardised.

Cheers,
Harald van Dijk
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux