bug-bash
[Top][All Lists]
Advanced

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

Re: ^O gets stuck if there's a bunch of history


From: Chet Ramey
Subject: Re: ^O gets stuck if there's a bunch of history
Date: Thu, 15 Sep 2011 15:41:35 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

On 9/15/11 1:41 PM, gregrwm wrote:

> Bash Version: 4.1
> Patch Level: 2
> Release Status: release
> 
> Description: ^O gets stuck if there's a bunch of history
> rpm -q bash             #i have this problem on bash-4.1.2-8.el6.x86_64
> dpkg-query -W bash      #and on 4.2-0ubuntu3
> echo $BASH_VERSION      #4.1.2(1)-release and/or 4.2.8(1)-release
> 
> Repeat-By:
> rm $HISTFILE                            #start with no history file
> exec -cl bash --norc --noprofile        #start with no history in memory
> pm=1.2.3.4                              #do some commands
> sb='echo sudo -uboo'
> ssb="$sb ssh -p1234 $pm cd boo;"
> $ssb 'echo run
> echo fox
> echo fun'
> exec -cl bash --norc --noprofile        #start over again
>                                        #now do the same commands from
> history starting with pm= using ^O.  should be no problem so far.
> for((i=0;i<1000;i++));do echo echo $i The quick brown fox jumps over
> the lazy dog.>>$HISTFILE;done      #add some more history
> exec -cl bash --norc --noprofile        #start over again
>                                        #now do the same commands from
> history starting with pm= using ^O.  i get stuck doing echo fox over
> and over.  no fun.

OK, without looking into it very deeply, I have to admit that I can't see
a real problem.  You just added 1000 identical lines directly to the
history file and read it into a fresh bash invocation.  Wouldn't you
expect that they would all end up in the history list?  If you don't want
to execute each line from the history, you should be able to just go to
the end of the history with M-> or edit the line you're currently on and
hit return.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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