Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: (about quoting) Re: (0) works as a charm




> On Nov 27, 2019, at 1:33 PM, Marc Chantreux <eiro@xxxxxxxxx> wrote:
> 
> hello,
> 
>> Are you saying that ‘\0’ is a quoted null character while $’\0’
>> is a quoted string with one character which is a null and somehow
>> zsh keeps quoted characters different from quoted strings?
> 
> the opposite: $'' is yet another quoting style in zsh to know what
> will be expanded
> 
>       | ""    $''  ''  none
>    ---+-----------------
>    $  | yes   no   no  yes
>    \  | yes   yes  no  no[1]
> 
>    [1] remove the '\' symbol
> 
>    print -r "\n" $'\n' '\n' \n | xxd
> 
> first i was confused because by default, print interpolate \
> before printing as long as you don't use -r.
> 
> so
> 
>    x='\0'
>    print $x
>    x=$'\0'
>    print $x
> 
> looks the same

AH!!  So… testing with “print” (without -r) has pitfalls…

I had no idea print was interpreting things on output…

thank you all for your patience

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Messages sorted by: Reverse Date, Date, Thread, Author