bug-bash
[Top][All Lists]
Advanced

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

Re: History counts backwards


From: Chet Ramey
Subject: Re: History counts backwards
Date: Tue, 28 Dec 2004 14:41:14 -0500

> 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?

The numbering is simply the index into a list of history entries.  If some
entries are removed, the numbering changes.  The history number is not
stored anywhere in the history entry itself; it is computed on the fly.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU    chet@po.cwru.edu    http://tiswww.tis.cwru.edu/~chet/




reply via email to

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