On Tue, Dec 24, 2024, at 12:10 PM, Zachary Santer wrote:
> Some other nonsense real quick:
>
> zsant@Zack2021HPPavilion MSYS ~/repos/bash
> $ : ${|  REPYL="whatever"}
> ; }
> bash: syntax error near unexpected token `;' while looking for matching `}'
> bash: DEBUG warning: current_token (10) != shell_eof_token (})
> bash: syntax error

What do you expect to happen here?


> zsant@Zack2021HPPavilion MSYS ~/repos/bash
> $ : ${|  REPYL="whatever"; }
> bash:  : command not found
>
> zsant@Zack2021HPPavilion MSYS ~/repos/bash
> $ : ${| REPYL="whatever"; }
> bash:  REPYL=whatever: command not found
>
> zsant@Zack2021HPPavilion MSYS ~/repos/bash
> $ : ${| REPYL="whatever"; }
> bash:  REPYL=whatever: command not found

The second and third examples above look exactly the same.  Are
they supposed to differ somehow?

Anyway, I'm not seeing these errors.  Judging from the messages,
I'd guess that you accidentally introduced a nonblank whitespace
character immediately after '${|'.

        bash-5.3$ : ${| REPYL="whatever"; }
        bash-5.3$ LC_ALL=en_US.UTF-8
        bash-5.3$ nbsp=$'\uA0'
        bash-5.3$ eval ': ${|'"$nbsp"' REPYL="whatever"; }'
        bash:  : command not found
        bash-5.3$ eval ': ${|'"$nbsp"'REPYL="whatever"; }'
        bash:  REPYL=whatever: command not found


> zsant@Zack2021HPPavilion MSYS ~/repos/bash
> $ : ${|
>  REPYL="whatever"
> }
>
> The first thing within a ${| command; } funsub has to be a command if
> it's on the same line as ${| ?

No.


-- 
vq

Reply via email to