Package: bash
Version: 4.1-3
Severity: normal

*** Please type your report below this line ***

After using the up key, "!string" history expansion is wrong.

To reproduce:

% echo foo
foo
% :
% echo bar
bar
%

Now press the "up" key two times to get to the ":", delete the ":"
and type "!e":

% !e
echo foo
foo

The bash manpage says:

       !string
              Refer to the most recent command starting with string.

and that's also what I'd expect intuitively, so it always confuses
me when "!string" does not expand to the most recent command
starting with string (which in the example would be "echo bar"), but
the one before the command that I select with "up".

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.34 (SMP w/1 CPU core)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash depends on:
ii  base-files                5.8            Debian base system miscellaneous f
ii  dash                      0.5.5.1-6      POSIX-compliant shell
ii  debianutils               3.3            Miscellaneous utilities specific t
ii  libc6                     2.11.2-2       Embedded GNU C Library: Shared lib
ii  libncurses5               5.7+20100313-2 shared libraries for terminal hand

Versions of packages bash recommends:
pn  bash-completion               <none>     (no description available)

Versions of packages bash suggests:
pn  bash-doc                      <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to