bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

M-^ and M-C-e with histverify turned on.


From: Luc Teirlinck
Subject: M-^ and M-C-e with histverify turned on.
Date: Thu, 2 Jan 2003 21:43:26 -0600 (CST)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' 
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -I/usr/include -O2 
-march=i386 -mcpu=i686
uname output: Linux swt40.swt.com 2.4.9-7smp #1 SMP Thu Oct 18 13:34:30 EDT 
2001 i686 unknown
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.05
Patch Level: 8
Release Status: release

Description:
        [Detailed description of the problem, suggestion, or complaint.]

The command history-expand-line (usually M-^) and the related command
shell-expand-line (usually M-C-e) act strangely when histverify is
turned on.  I realize that, in this situation, the effect of M-^ can
be achieved by RETURN and the effect of M-C-e by RETURN followed by
M-C-e.  Hence I agree that the described bug is not really terribly bad
or urgent, but the actual behavior of M-^ and M-C-e is nevertheless
confusing and it would be better if they acted as expected.

The actual behavior of M-^ and C-M-e with histverify turned on is that
they just recopy the line to be expanded on a new line.

In the run below, M-^ and C-M-e expanded !:s/aha/ihi $0 to the correct
values when applied on the line marked ###, but just kept recopying the
same line over and over after the `shopt -s histverify'.

Contrary to bashbug's claims above, I am using bash-2.05b with all
current "official" patches applied.

Repeat-By: [Describe the sequence of events that causes the problem to
        occur.]

[bash2.05b.0 ~ 3 1] exec -c /usr/local/bin/bash --noprofile --norc
bash-2.05b$ echo aha
aha
bash-2.05b$ !:s/aha/ihi $0        ###      
echo ihi $0
ihi /usr/local/bin/bash
bash-2.05b$ shopt -s histverify
bash-2.05b$ echo aha
aha
bash-2.05b$ !:s/aha/ihi $0
bash-2.05b$ !:s/aha/ihi $0
bash-2.05b$ !:s/aha/ihi $0
bash-2.05b$ !:s/aha/ihi $0
bash-2.05b$ !:s/aha/ihi $0
bash-2.05b$ echo ihi $0
ihi /usr/local/bin/bash
bash-2.05b$ 




reply via email to

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