bug-bash
[Top][All Lists]
Advanced

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

Re: History counts backwards


From: Geoff Kuenning
Subject: Re: History counts backwards
Date: 28 Dec 2004 20:35:02 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

> > > Did you happen to have HISTCONTROL set?
> > 
> > Yes, it's set to "erasedups".
> 
> Well, then it's easily possible for the history number to go backward as
> you observed.  If you're at the limit (500), but the `erasedups' setting
> causes a number of previous history entries to be removed, the number of
> the last history entry will decrease.

Hmmm.  Well, I'm glad it's not a real bug.  But I have to confess I'd
find the behavior easier to understand if erasedups never changed the
history number.  I would expect that after a very long session with
erasedups, I might have entries ranging from (e.g.) 790 to 1675, with
gaps in between, but the next entry would be numbered 1676 regardless
of whether it matched something in the previous history.  Only when I
exit and reenter would I expect recent entries to be renumbered.
(That was the old csh behavior, back before bash was an option for
me.)

Am I completely misunderstanding how bash numbers history entries?
-- 
    Geoff Kuenning   geoff@cs.hmc.edu   http://www.cs.hmc.edu/~geoff/

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
                -- Isaac Asimov




reply via email to

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