Tíquete #36744

Treatment of reserved word following assignment

: 2016-10-23 23:15 Última Atualização: 2016-12-16 22:39

Relator:
Dono:
Estado:
Aberto [Owner assigned]
Componente:
Marcos:
(Nenhum)
Prioridade:
3
Gravidade:
5 - Medium
Resolução:
Postponed
Arquivo:
Nenhum
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
  • Prioridade Update from 5 - Medium to 3
Comentário

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

2016-11-14 22:42 Updated by: magicant
  • Resolução Update from Nenhum to Postponed
Comentário

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

Editar

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