Ticket #36744

Treatment of reserved word following assignment

Open Date: 2016-10-23 23:15 Last Update: 2016-12-16 22:39

Reporter:
Owner:
Status:
Open [Owner assigned]
Component:
MileStone:
(None)
Priority:
3
Severity:
5 - Medium
Resolution:
Postponed
File:
None
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

The new POSIX requires reserved words be recognised even after assignment words. For example, in the command line:

$ foo=bar if

the token "if" is now treated as a reserved word "if", which results in a syntax error when the command line is parsed. Previously, the token was treated as a command name word and typically causing a command-not-found error at runtime.

Currently, only zsh seems to support the new POSIX behavior. Other shells (bash, dash, ksh, mksh, and current yash) behave as defined in the previous POSIX.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10

Ticket History (3/4 Histories)

2016-10-23 23:15 Updated by: magicant
  • New Ticket "Treatment of reserved word following assignment" created
2016-10-23 23:17 Updated by: magicant
  • Priority Update from 5 - Medium to 3
Comment

Lowering priority. I'm not sure if this interpretation is intended in the new POSIX.

2016-11-14 22:42 Updated by: magicant
  • Resolution Update from None to Postponed
Comment

Waiting for a revision of the spec. http://austingroupbugs.net/view.php?id=1100

2016-12-16 22:39 Updated by: magicant

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login