Unexpected "!$" history expansion after use of here-document

2018-09-11 Thread Viktor Dukhovni
Configuration Information [Automatically generated, do not change]: Machine: amd64 OS: freebsd11.1 Compiler: cc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='amd64' -DCONF_OSTYPE='freebsd11.1' -DCONF_MACHTYPE='amd64-portbld-freebsd11.1' -DCONF_VENDOR='portbld' -DLOCALEDIR='/usr/local/sha

Re: History of bash's support for self-modifying shell scripts?

2018-09-11 Thread Chet Ramey
On 9/10/18 5:39 PM, Josh Triplett wrote: >> It happens in only a few cases: 1) when forking a child to run a command; >> 2) when a redirection specifies the same file descriptor as bash is using >> to read a script; and 3) when bash is reading a script from stdin and the >> read builtin is used to