[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: history separates >| and 2>&1 tokens when recalled with !*
From: |
Piotr Grzybowski |
Subject: |
Re: history separates >| and 2>&1 tokens when recalled with !* |
Date: |
Fri, 22 Apr 2016 10:44:33 +0200 |
hi,
yes, this happens here:
lib/readline/histexpand.c:1406
result[offset++] = ' ';
pg
On 22 Apr 2016, at 01:28, idallen@home.idallen.ca wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
> -DHAVE_CONFIG_H -I. -I../. -I.././include -I.././lib -D_FORTIFY_SOURCE=2
> -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall
> uname output: Linux idallen-oak 4.2.0-35-generic #40-Ubuntu SMP Tue Mar 15
> 22:15:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
>
> Bash Version: 4.3
> Patch Level: 42
> Release Status: release
>
> Description:
> The history recall !* incorrectly pulls apart the >| and 2>&1
> words, making them useless.
>
> Repeat-By:
> bash-4.3$ date >| /tmp/i
> bash-4.3$ who !*
> who > | /tmp/i
> bash: syntax error near unexpected token `|'
>
> bash-4.3$ date 2>&1
> Thu Apr 21 19:24:46 EDT 2016
> bash-4.3$ echo !*
> echo 2 >& 1
> 2
>