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 $
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
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
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
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