bug-bash
[Top][All Lists]
Advanced

[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


From: Alex fxmbsw7 Ratchev
Subject: Re: is it normal that set -x unset commands dont display special chars in the content
Date: Mon, 1 Mar 2021 13:35:26 +0100

oh i see, thank you big time for pointing it out so good
:))

On Mon, Mar 1, 2021 at 11:22 AM felix <felix@f-hauri.ch> wrote:

> On Sun, Feb 28, 2021 at 10:32:13PM +0000, kfm@plushkava.net wrote:
> > 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".
>
> I agree:
>
> $ declare -A map; key=$'foo\34bar'; map[$key]=
> $ exec {BASH_XTRACEFD}> >(sed -ue 's/\o34/<<\\34>>/')
> $ set -x
> $ : "$key"
> + : $'foo\034bar'
> $ unset map["$key"]
> + unset 'map[foo<<\34>>bar]'
>
>
> --
>  FĂ©lix Hauri   -   <felix@f-hauri.ch>   -   http://www.f-hauri.ch
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]