#233317 bash: specifying "--posix" should also enable "xpg_echo".

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
Jeff Sheinberg
Date:
2024-05-09 04:18:03 UTC
Severity:
normal
Tags:
#233317#5
Date:
2004-02-18 00:34:10 UTC
From:
To:
Package: bash
Version: 2.05b-13
Severity: normal

Hi,

It seems to me that bash's posix mode should include enabling
xpg_echo mode, in accordance with the SUSv3/POSIX XSI
requirements.

    $ echo 'echo "a\\b"' | bash --posix
    a\b

    $ echo 'shopt -s xpg_echo ; echo "a\\b"' | bash --posix
    a

    $ echo 'shopt -s xpg_echo ; echo "a\\b"' | bash
    a

Thanks,

#233317#10
Date:
2004-02-21 02:01:09 UTC
From:
To:
Matthias Klose wrote:

I don't think I want to break backwards compatibility that badly.
Remember that bash also goes into posix mode when invoked as `sh'.
I will think about doing it for --posix only; perhaps for `set -o
posix' also.

Chet