History expansion is strangely re-enabled.

View: New views
3 Messages — Rating Filter:   Alert me  

History expansion is strangely re-enabled.

by Pierre Gaston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: openbsd4.6
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='openbsd4.6' -DCONF_MACHTYPE='i386-unknown-openbsd4.6'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale'
-DPACKAGE='bash' -DSHELL  -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib
-I/usr/local/include -O2 -pipe
uname output: OpenBSD obsd1 4.6 GENERIC#58 i386
Machine Type: i386-unknown-openbsd4.6

Bash Version: 4.0
Patch Level: 24
Release Status: release

Description:

It looks like a bug, so I'm reporting it
I'm not very familiar with history expansion, so It's perhaps something
I don't understand, in which case I apologize.

Repeat-By:

bash-4.0$ echo foo
foo
bash-4.0$ !echo
echo foo
foo
bash-4.0$ set +H;!((3))
bash: !: event not found
bash-4.0$ !echo
echo foo
foo
bash-4.0$ set +H
bash-4.0$ !echo
bash: !echo: command not found

Fix:
  None





Re: History expansion is strangely re-enabled.

by Pierre Gaston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On Sat, 31 Oct 2009, Andreas Schwab wrote:

> Pierre Gaston <pierre.gaston@...> writes:
>
>> bash-4.0$ set +H;!((3))
>> bash: !: event not found
>
> That command line was never executed because history expansion failed.


Thanks, you are right, I should have played more with !, sorry.






Re: History expansion is strangely re-enabled.

by Andreas Schwab-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Pierre Gaston <pierre.gaston@...> writes:

> bash-4.0$ set +H;!((3))
> bash: !: event not found

That command line was never executed because history expansion failed.

Andreas.

--
Andreas Schwab, schwab@...
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."