Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59267 - bash-3.0 : going back in history and returning to the current line stops 1 line too early
Summary: bash-3.0 : going back in history and returning to the current line stops 1 li...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-03 07:24 UTC by Martin Wegner
Modified: 2004-09-27 19:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The patch as a file (bash-3.0-history-bug.patch,1013 bytes, patch)
2004-09-26 09:11 UTC, Guillaume Castagnino
Details | Diff
updated bash-3.0-r5 ebuild including history-bug.patch (bash-3.0-r5.ebuild,4.87 KB, text/plain)
2004-09-27 05:38 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details
diff against portage's bash-3.0-r5.ebuild (bash-3.0-r5.ebuild.diff,550 bytes, text/plain)
2004-09-27 05:42 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Wegner 2004-08-03 07:24:45 UTC
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"
Comment 1 Stuart Shelton 2004-08-03 09:53:25 UTC
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...
Comment 2 Ole Langbehn 2004-08-14 10:38:38 UTC
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.
Comment 3 Ole Langbehn 2004-08-14 10:40:31 UTC
This is with all users, even with an empty .bashrc, nearly empty home (fresh install). seems to be a bash problem.
Comment 4 Guillaume Castagnino 2004-09-26 09:04:32 UTC
There is an official patch here :
http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00087.html
Comment 5 Guillaume Castagnino 2004-09-26 09:11:17 UTC
Created attachment 40458 [details, diff]
The patch as a file
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2004-09-27 05:38:57 UTC
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
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2004-09-27 05:42:28 UTC
Created attachment 40524 [details]
diff against portage's bash-3.0-r5.ebuild

diff against the current bash-3.0-r5 ebuild
Comment 8 Aron Griffis (RETIRED) gentoo-dev 2004-09-27 19:45:09 UTC
Fixed in bash-3.0-r6, thanks