On Sun, Oct 20, 2024, 20:52 Zachary Santer <zsan...@gmail.com> wrote:

>
> Item 8 is just odd and is on the verge of being a dealbreaker. Not to
> go off on another tangent, but what on Earth?
>

AFAICT it's the non-POSIX-mode Bash behavior that is unusual.

While all shells will have treat single quotes as literal here:

    $ V=set
    $ echo "${V+'x'}"
    'x'

Pretty much every other shell (and bash in posix mode) will continue to do
so for:

    $ echo "${V+'x}"
    'x

...while bash will treat this as an unterminated command.  Because in bash,
this is a weird kind of quoting, where the quotes are preserved but any }
character within them loses its special meaning:

    $ unset U
    $ (set +o posix; echo "${U+'}'y}")

    $ (set -o posix; echo "${U+'}'y}")
    'y}

>

Reply via email to