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]'

code includes

minuskws_p1=$nspace$SUBSEP$minuskws_id$SUBSEP \
minuskws_p2=$nspace${SUBSEP}kw$SUBSEP

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".

--
Kerin Millar

Reply via email to