On 8/20/20 9:08 AM, Martijn Dekker wrote:
> Op 12-08-20 om 16:40 schreef Chet Ramey:
>> 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?
> 
> Yes, that was my intention.

OK. That was my question, since that doesn't seem to happen. With your
patch (and even before), for instance, consider the following commands
on an empty history:

echo a
echo b
fc -l
fc -l 1002 1100

The first `fc' will list the echo commands. The second `fc' will list the
last command in the history, since both numbers are clamped at the end of
the history -- the range ends up being `last-last'.

Chet

-- 
``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/

Reply via email to