WG15 Defect Report Ref: 9945-2-136
Topic: fc -l <first>


This is an approved interpretation of 9945-2:1993.

.

Last update: 1997-05-20


								9945-2-136

 _____________________________________________________________________________

	Topic:                  fc -l <first>
	Relevant Sections:      5.12.4

Defect Report:
-----------------------
	From: [email protected] (Andrew Josey)
	Date: Tue, 15 Aug 1995 16:25:36 +0100


This is a request for interpretation of ISO/IEC 9945-2


Historical shells do not implement fc -l <first>  as described
in ISO/IEC 9945-2 since they include the current "fc" call in the
output. Was this change from historical behavior intentional ?  

On page 546, section 5.12.4, lines 2196-2197 specify that "if 
last is omitted, last shall default to the previous command when -l 
is specified".  It's clear that "previous command" refers to the 
command immediately preceding the "fc" call from lines 2198-2200, 
as it would make no sense to edit only the fc call.

Historical Korn Shell behavior with -l when last was not specified 
was to display everying including the current fc command (or whatever command
caused fc to be invoked).  This means that the description
in the standard is not consistant with historical practice.
In addition, with historical practice, the 16 commands included
the current command so that only the 15 previous commands
are displayed.



Thankyou for your attention in this matter

Interpretation response
------------------------


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

There is no clear definition of whether the previous command
refers to the history before fc was entered or the history
including the fc command. It also appears that in historic
practice this definition varied depending on the options given.

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

Forwarded to Interpretations group: Aug 15 1995
Recirculated for 30 day review: Oct 19 1995
Finalised: Nov 20 1995