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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/