IEEE Std 1003.2-1992 Interpretation #136


Copyright © 1996 IEEE. All rights reserved.


Interpretation Number: 136
Topic:	fc -l 
Relevant Sections:	5.12.4

Interpretation Request:
-----------------------
Historical shells do not implement fc -l  as described in IEEE Std 
1003.2-1992 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.

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.



Back to IEEE Standards Interpretations for IEEE Std 1003.2-1992


© Copyright IEEE-SA
Contact IEEE-SA
For questions or comments, please contact the IEEE-SA Webmaster.