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

Re: (0) not working ?



I’m very new here so take what I say with caution but why
did you put the backslash before the 0?

Also, this is going to null terminate each word and so what I
would do to verify this is either pipe it into xargs with -0 (if you
have that) or od -cx so you can verify that it is working like
you expect.

> On Nov 27, 2019, at 7:00 AM, Marc Chantreux <eiro@xxxxxxxxx> wrote:
> 
> hello people,
> 
> in zshexpn, i read about 0: "This is a shorthand for `ps:\0:'".
> so i wrote:
> 
>    assigned_to=( qa c c++ )
>    local -A user=(
>        login marc
>        roles ${(j:\0:)assigned_to}
>    )
>    print -l ${(s:\0:)user[roles]}
>    print -l ${(@0)user[roles]}
>    print -l ${(@0)user[roles]}
> 
> and i got
> 
>    qa
>    c
>    c++
>    qacc++
>    qacc++
> 
> is there something to setopt? did i miss something ?
> 
> regards,
> marc

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



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