On 8/11/20 11:59 AM, Martijn Dekker wrote: > This is different from every other shell, and also looks like it's contrary > to the POSIX spec: > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/fc.html#tag_20_44_05 > > | When a range of commands is used, it shall not be an error to specify > | first or last values that are not in the history list; fc shall > | substitute the value representing the oldest or newest command in the > | list, as appropriate. For example, if there are only ten commands in > | the history list, numbered 1 to 10: > | > | fc -l > | fc 1 99 > | > | shall list and edit, respectively, all ten commands.
What's your opinion about what the `as appropriate' means? An out-of-range `first' gets substituted with the first command in the history, and an out- of-range `last' gets the last history entry? Bash does one thing, your patch does another, but neither one does that. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/