View Issue Details

IDProjectCategoryView StatusLast Update
00002651003.1(2004)/Issue 6Shell and Utilitiespublic2013-04-16 13:06
Reportergeoffclare Assigned Toajosey  
PrioritynormalSeverityObjectionTypeClarification Requested
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionmore
Page Number643
Line Number24934-24941
Interp StatusApproved
Final Accepted Text0000265:0000440
Summary0000265: more -e contradiction
Description The specification of the more utility contains a contradiction with
 regard to the -e option. The description of the -e option is:

     By default, more shall exit immediately after writing the last
     line of the last file in the argument list. If the -e option is
     specified:

       1. If there is only a single file in the argument list and that
          file was completely displayed on a single screen, more shall
          exit immediately after writing the last line of that file.

       2. Otherwise, more shall exit only after reaching end-of-file on
          the last file in the argument list twice without an
          intervening operation. See the EXTENDED DESCRIPTION section.

 However, the EXTENDED DESCRIPTION states:

     For all files but the last (including standard input if no file
     was specified, and for the last file as well, if the -e option was
     not specified), when more has written the last line in the file,
     more shall prompt for a user command.

 Both pieces of text are from POSIX.2b. It appears that the intention
 in .2b was to change the requirements for -e and the default
 end-of-last-file behaviour to the opposite of what POSIX.2-1992
 required (except in the case of a single file completely displayed on
 a single screen), but the need to remove the word "not" from the above
 parenthetical statement in the extended description was overlooked.

 However, given that the standard has, since 2001, contradicted
 itself, we have an opportunity to revisit the .2b decision.
 In particular, all currently certified UNIX03, UNIX98 and UNIX95
 systems still behave as per the original POSIX.2-1992 requirement.
 They have not followed the intended .2b change.

 The original POSIX.2-1992 requirement makes more sense to me, given
 that the ability to scroll backwards was added to the more utility
 by POSIX.2. I think most users on reaching the end of the last file
 would want the choice of scrolling back or exiting, so prompting
 _should_ be the default (except perhaps in the case of a single file
 completely displayed on a single screen).

 Therefore I propose that we reinstate the POSIX.2-1992 requirement
 at the next opportunity (TC1 of the 2008 revision), so that the
 standard once again matches existing practice, and the edits
 suggested below do that. The .2b requirement relating to a single
 file completely displayed on a single screen could also be retained
 if desired, although it would have to move from the -e description
 to the extended description.

 An alternative solution would be to specify two options (such as -e
 and -E), one which selects exit-at-end-of-last-file and one which
 selects prompt-at-end-of-last-file, and say that it is unspecified
 which one is the default, and that "the last one wins". This would
 allow users to include their preferred option in an alias and/or the
 PAGER variable, and to override it on occasion if necessary.
Desired ActionReplace the description of the -e option with:

     Exit immediately after writing the last line of the last file in
     the argument list; see the EXTENDED DESCRIPTION section.
Tagstc1-2008

Activities

geoffclare

2010-06-25 16:08

manager   bugnote:0000435

Last edited: 2010-06-25 16:09

Copied from xcubug2.txt ERN 185

geoffclare

2010-06-26 17:40

manager   bugnote:0000440

Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
None.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Make the change suggested by the submitter.

(In the 2008 edition std p2943 lines 96840-96845)

ajosey

2010-07-30 08:18

manager   bugnote:0000491

Comments/objections on the proposed interpretation are due by COB Aug 31 2010

Don Cragun

2010-09-09 15:23

manager   bugnote:0000543

We believe that this change makes the standard match historic practice.
Therefore, this change is suitable for a TC and need not wait for the next revision of the standard.

Issue History

Date Modified Username Field Change
2010-06-25 16:08 geoffclare New Issue
2010-06-25 16:08 geoffclare Status New => Under Review
2010-06-25 16:08 geoffclare Assigned To => ajosey
2010-06-25 16:08 geoffclare Name => Geoff Clare
2010-06-25 16:08 geoffclare Organization => The Open Group
2010-06-25 16:08 geoffclare Section => more
2010-06-25 16:08 geoffclare Page Number => 643
2010-06-25 16:08 geoffclare Line Number => 24934-24941
2010-06-25 16:08 geoffclare Interp Status => ---
2010-06-25 16:08 geoffclare Note Added: 0000435
2010-06-25 16:09 geoffclare Note Edited: 0000435
2010-06-26 17:40 geoffclare Note Added: 0000440
2010-06-26 17:41 geoffclare Interp Status --- => Pending
2010-06-26 17:41 geoffclare Final Accepted Text => 0000265:0000440
2010-06-26 17:41 geoffclare Status Under Review => Interpretation Required
2010-06-26 17:41 geoffclare Resolution Open => Accepted
2010-07-30 08:18 ajosey Interp Status Pending => Proposed
2010-07-30 08:18 ajosey Note Added: 0000491
2010-09-03 16:37 ajosey Interp Status Proposed => Approved
2010-09-09 15:21 Don Cragun Tag Attached: tc1-2008
2010-09-09 15:23 Don Cragun Note Added: 0000543
2013-04-16 13:06 ajosey Status Interpretation Required => Closed