Re: differences in Q.-removal, var-expansion and allowed characters in fn & var names

2016-01-10 Thread Linda Walsh
Andreas Schwab wrote: That's not the same statement. The same statement would be def='function $fn () { echo $fn ; }' I know what you mean, but, Yeah, sorta but I want it to do variable expansion AND quote removal. I.e. using a var or DQ of the object-name, "a", works in declare. Work

Re: implicit redirection of background within pipeline

2016-01-10 Thread Piotr Grzybowski
hey, I am quite sure it happens here (devel branch, at 6f82653c5ef09aeeeba4376a1c65ce86c3605c00): execute_cmd.c +5115: if ((cmdflags & CMD_STDIN_REDIR) && pipe_in == NO_PIPE && (stdin_redirects (redirects) == 0)) async_redirect_stdin (); but after reading the comments some 3.5k lin

"read < <(:); echo $?" prints 0 when job control is disabled (should be 1?)

2016-01-10 Thread Alastair Hughes
When job control is enabled: $ read < <(:); echo $? 1 When job control is disabled: $ read < <(:); echo $? 0 Is this a bug, or valid behavior? It seems to be caused by already_making_children being set in the bash without job control; the shell waits for a child and sets exec_status to 0

implicit redirection of background within pipeline

2016-01-10 Thread Martin D Kealey
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' -DPACKAG

Re: doesn't bash do variable subst. or quote removal on function statement

2016-01-10 Thread Andreas Schwab
Linda Walsh writes: >> shopt -s expand_aliases; alias my=declare >> declare fn=myfunc## function name in variable > doesn't work >> function $fn { echo $fn ; } > -bash: `$fn': not a valid identifier >>my -pf myfunc > -bash: declare: myfunc: not found >> >> def="function $