Message97081
The shlex parser parses "foo#bar" as "foo", discarding the rest as a
comment. This is actually one of the test cases, even in POSIX mode.
However, POSIX (see below) only allows comments to start at the
beginning of a token, so "foo#bar" has to result in a "foo#bar" token.
To easily see this, do "echo foo#bar" in bash, versus "echo foo #bar".
Fixing this might break some applications that rely on this broken
behaviour, even though they're not strictly POSIX compliant.
POSIX 2008, Rationale C.2.3 (which refers to Shell & Utilities 2.3(10)):
The (10) rule about '#' as the current character is the first in the
sequence in which a new token is being assembled. The '#' starts a
comment only when it is at the beginning of a token. This rule is also
written to indicate that the search for the end-of-comment does not
consider escaped <newline> specially, so that a comment cannot be
continued to the next line. |
|
Date |
User |
Action |
Args |
2009-12-31 08:42:43 | jjdmol2 | set | recipients:
+ jjdmol2 |
2009-12-31 08:42:43 | jjdmol2 | set | messageid: <1262248963.08.0.673944744724.issue7611@psf.upfronthosting.co.za> |
2009-12-31 08:42:42 | jjdmol2 | link | issue7611 messages |
2009-12-31 08:42:40 | jjdmol2 | create | |
|