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: gregrwm
Subject: Re: ^O gets stuck if there's a bunch of history
Date: Sat, 17 Sep 2011 07:41:19 -0500

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

hi chet,
sorry for not being more clear.
once the history file is big enough, when i go back to the commands i
want to repeat (using ^R to find pm=), and start executing them with
^O, it gets stuck on the multiline quoted command, which doesn't
happen before all the other history was in there.  my repeat-by
sequence should walk you though seeing it work before adding the extra
history and seeing it get stuck once the extra history is there.  i'm
hopeful it's repeatable for you.
with my thanks,
greg



reply via email to

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