Re: fc -l history specification out of range with empty history

2017-03-21 Thread Grisha Levit
On Tue, Mar 21, 2017 at 11:59 AM, Chet Ramey wrote: >> As a special case, `fc -l -0' usually prints itself but not in the >> empty history (or HISTSIZE=1) case. > > Yeah, that's a special case, but not when there are no commands in > the history list. Thanks for the explanation. FWIW my less-dege

Re: fc -l history specification out of range with empty history

2017-03-21 Thread Chet Ramey
On 3/21/17 11:35 AM, Grisha Levit wrote: > 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 fc deals with the commands in the history list before the `fc' (that's what the `pre

fc -l history specification out of range with empty history

2017-03-21 Thread Grisha Levit
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 erro