bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fc -l history specification out of range with empty history


From: Grisha Levit
Subject: fc -l history specification out of range with empty history
Date: Tue, 21 Mar 2017 11:35:41 -0400

If the history is empty (or if HISTSIZE is 1) running `fc -l' produces an error:

    $ history -c
    $ fc -l
    bash: fc: history specification out of range

I'm not sure this is necessary, since other instances of `first' and
`last' being outside of the saved history range don't produce an
error.  Also the `history' command doesn't have this behavior:

    $ history -c
    $ history
        1  history

As a special case, `fc -l -0' usually prints itself but not in the
empty history (or HISTSIZE=1) case.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]