[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is it normal that set -x unset commands dont display special chars i
Re: is it normal that set -x unset commands dont display special chars in the content
Sun, 28 Feb 2021 22:32:13 +0000
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.0
On 28/02/2021 22:13, Chet Ramey wrote:
On 2/27/21 6:14 AM, Alex fxmbsw7 Ratchev wrote:
but they get unset right, just doesnt display em
i have stuff with $'\34' separator and in set -x output the text is just
flat for the unset
+ unset 'dat[kwmetest]' 'dat[1kw1]' 'dat[1take]' 'dat[1code]'
These code fragments have nothing to do with each other. Why not include
a self-contained example that includes relevant `stuff' in what you're
passing to `unset'?
Why not indeed. However, I think that I'm able to decipher this.
$ declare -A map; key=$'foo\34bar'; map[$key]=
$ set -x
$ : "$key"
+ : $'foo\034bar'
$ unset "map[$key]"
+ unset 'map[foobar]'
For the unset command, xtrace elects to emit the (non-printable) FS
character verbatim rather than employ the ANSI-style notation.
Presumably, this led to the conclusion that bash doesn't "display em".