Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: (0) not working ?
- X-seq: zsh-users 24469
- From: Perry Smith <pedz@xxxxxxxxxxxxxxxx>
- To: Marc Chantreux <eiro@xxxxxxxxx>
- Subject: Re: (0) not working ?
- Date: Wed, 27 Nov 2019 07:54:35 -0600
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=References:To:Cc:In-Reply-To:Date:Subject: Mime-Version:Content-Type:Message-Id:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GLRTXsjXAzUG+yYtHlNWmpZziHo6k8+rUQ61lRxBFY8=; b=UN3dcbl7UvL/45Azmk8llzhma wKWZTnNQkLxKXGkK44joI9N2EsaqP3vskY+OzspUwLwtnVb1i6uQgiapDsY/Al8MdaCFAhxSxBPhT mx1q/KHz2S4ZQ7OtF3BR3q3iBHfTcxOh7EMZDNLWEs7aCramERGGQLCr7j5eAP3fpTzjR0Fia02po M85UiOA9wE7pmYZFK7riOvBPOtONe1OEL3pYXiC0dOdJh74AysmFzK4WQnX0W2k6PWLuDKeAepCgd 6saQ1Z7qpfqkiwxMT7qH7mUB8bDm+e5GsZkF1PPryQ0k9D2CP/0Sep88lu04BT2X+HNJJ+2TpUDnm GjFvR44yg==;
- In-reply-to: <20191127130038.GA19354@prometheus.u-strasbg.fr>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20191127130038.GA19354@prometheus.u-strasbg.fr>
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