Austin Group Defect Tracker

Aardvark Mark III


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000159 [1003.1(2008)/Issue 7] Shell and Utilities Editorial Clarification Requested 2009-09-28 16:00 2009-10-08 16:10
Reporter nick View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Resolved  
Name Nick Stoughton
Organization USENIX
User Reference jmg-getopts-001
Section getopts
Page Number 2778
Line Number 90589
Interp Status ---
Final Accepted Text See Note: 0000244
Summary 0000159: Wording improvement for getopts
Description Double negatives are hard to parse ...
Desired Action Change

if there are no other non-option-arguments appearing before it

to

if there are only option arguments appearing before it
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000244)
geoffclare (manager)
2009-09-28 16:46

That whole paragraph has more problems. Firstly, the phrase
"non-option-argument" is ambiguous: it can be parsed as
(non-option)-argument as intended, or as non-(option-argument).
Secondly, it doesn't properly account for arguments that are
option-arguments. Thirdly, it uses "option-argument" when it
means an argument that is an option. Finally, it refers to "--"
as a "special option", which it is not.

I think the most awkward complications could be avoided simply
by referring to operands.

Here is a suggested replacement paragraph:

    When the end of options is encountered, the getopts utility shall
    exit with a return value greater than zero; the shell variable
    OPTIND shall be set to the index of the first operand, or the
    value "$#"+1 if there are no operands; the name variable shall be
    set to the <question-mark> character. Any of the following
    shall identify the end of options: the first "--" argument that
    is not an option-argument, finding an argument that is not an
    option-argument and does not begin with a '-', or encountering
    an error.

- Issue History
Date Modified Username Field Change
2009-09-28 16:00 nick New Issue
2009-09-28 16:00 nick Status New => Under Review
2009-09-28 16:00 nick Assigned To => ajosey
2009-09-28 16:00 nick Name => Nick Stoughton
2009-09-28 16:00 nick Organization => USENIX
2009-09-28 16:00 nick User Reference => jmg-getopts-001
2009-09-28 16:00 nick Section => getopts
2009-09-28 16:00 nick Page Number => 2778
2009-09-28 16:00 nick Line Number => 90589
2009-09-28 16:00 nick Interp Status => ---
2009-09-28 16:46 geoffclare Note Added: 0000244
2009-10-08 16:10 nick Final Accepted Text => See Note: 0000244
2009-10-08 16:10 nick Status Under Review => Resolved
2009-10-08 16:10 nick Resolution Open => Accepted As Marked


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker