auto_resume takes effect too early in command substitution

1 view
Skip to first unread message

Oğuz

unread,
Aug 17, 2020, 12:15:54 AM8/17/20
to bug-bash
See:

$ sleep 20
^Z
[1]+ Stopped sleep 20
$
$ auto_resume= sleep
sleep: missing operand
Try 'sleep --help' for more information.
$
$ echo $(auto_resume= sleep)
bash: fg: no current jobs

$

`auto_resume= sleep' has the same effect as `auto_resume= command sleep' in
a
command substitution but I think it shouldn't; I'd expect a command to
behave
the same way both inside and outside `$(...)'.

This is reproducible on 5.1.0(14)-beta too.

Oğuz

Chet Ramey

unread,
Aug 18, 2020, 4:36:04 PM8/18/20
to Oğuz, bug-bash, chet....@case.edu
On 8/17/20 12:15 AM, Oğuz wrote:
> See:
>
> $ sleep 20
> ^Z
> [1]+ Stopped sleep 20
> $
> $ auto_resume= sleep
> sleep: missing operand
> Try 'sleep --help' for more information.
> $
> $ echo $(auto_resume= sleep)
> bash: fg: no current jobs

Thanks for the report. I'll take a look.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ch...@case.edu http://tiswww.cwru.edu/~chet/

Reply all
Reply to author
Forward
0 new messages