When I went back in the command history of my bash with bash-2.05b-r9 with the up arrow key and then went forward with the down arrow key it stopped at the empty prompt. Now bash stops at the last command entered, so one line too early. Reproducible: Always Steps to Reproduce: [described above] Actual Results: Stops one line too early (at the last command). Expected Results: Should stop at an empty prompt. # emerge info Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.4, glibc-2.3.4.20040619-r0, 2.6.8-rc2) ================================================================= System uname: 2.6.8-rc2 i686 AMD Duron(tm) Gentoo Base System version 1.5.1 distcc 2.15 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=i686 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=i686 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="3dnow X aalib acpi alsa apache2 apm avi berkdb bonobo cdr clamav crypt cups dedicated doc dvd encode esd fbcon foomaticdb freetype gd gdbm gif gnome gpm gtk gtk2 imagemagick imlib java jpeg libg++ libwww mad mailwrapper mikmod mmx motif mpeg mysql ncurses net nls oggvorbis opengl oss pam pdflib perl png python quicktime radeon readline ruby samba sdl slang spell sse ssl tcltk tcpd tetex truetype usb videos x86 xml2 xmms xv zlib"
I find differently - if I repeatedly go a few steps back through my history, then forward until I'm on the "most recent" command, then this "most recent" command slowly migrates *up* my history list! bash seems to be placing the command immediately after the one at which I stop after the last command: e.g. 1 2 3 4 <up><up><up><up> [command shown is "1"] <down> ["2"] <down> ["3"] <down> ["4"] <down> [command shown is "2"!] I have "HISTCONTROL=ignoredups", if that makes any difference...
I'm experiencing the same thing, it is always the command one history-step after (time-wise) the one I stopped going upwards and returned downwards. When I go up many steps, then down a couple to command x, up once, then all the way down, command x is shown last...so going up seems to be the trigger.
This is with all users, even with an empty .bashrc, nearly empty home (fresh install). seems to be a bash problem.
There is an official patch here : http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00087.html
Created attachment 40458 [details, diff] The patch as a file
Created attachment 40523 [details] updated bash-3.0-r5 ebuild including history-bug.patch Hi, I included and tested the patch from comment #5 Works quite good atm :) I hope it doesn't include new errors, too. Poly
Created attachment 40524 [details] diff against portage's bash-3.0-r5.ebuild diff against the current bash-3.0-r5 ebuild
Fixed in bash-3.0-r6, thanks