bug-bash
[Top][All Lists]
Advanced

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

Newline escape + here document in history


From: Geoffrey Allott
Subject: Newline escape + here document in history
Date: Sat, 21 Nov 2015 13:19:00 +0000

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-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale'
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include
-I./lib  -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong --param=ssp-buffer-size=4
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin'
-DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc'
-DSYS_BASH_LOGOUT='/etc/bash.bash_logout'
uname output: Linux GeoffPC 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27
08:13:28 CET 2015 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 4.3
Patch Level: 42
Release Status: release

Description:
When using a here document in combination with newline escapes the
command is incorrectly recorded in the history

Repeat-By:

This command works correctly:

$ cat << END && cat \
/dev/null
hello!
END

Press "up" and it is replaced by this:

$ cat << END && cat /dev/nullhello!
END

Resulting in this error
cat: /dev/nullhello!: No such file or directory

Fix:

Needs to retain the newline between /dev/null and hello! which is
erased for some reason.



reply via email to

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