Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Should zipping two empty arrays result in empty string?
- X-seq: zsh-users 22318
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Should zipping two empty arrays result in empty string?
- Date: Sun, 1 Jan 2017 12:24:51 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=t4mdbOn+A7Vu765m7LLlwO1Il1og+TSKGTq66Rp0UKY=; b=nGLMmK466ReS+/pMC/OKBAFhzZ5fg42ezjNsSkNvsTkfu9bTHTg9rBvMjO+eqq3NXt i8MnVN1Po5OEam331VrFgOZezDaes7cJoSZ3S8x+N2S21+28HyYCVA0U+owmypRREywu FLVHCZ71KSyGJeXTHVSpOsGj/PzMVKXYojo4sCIo81EQzsLbsntaRkz+fRMvwuM0OGOI q6aF8H6Ztz6C1YZBAzv04KNaEsQHCKyJc1zGEqtYw5mNg0VaXaraZVD6RPsK6KRUGVnQ /5hcsqXA9HrteqRAekpCyIwNdDg8pv6bxcViMWtQrUZbnykzIfbc/048QkSfLLfN5h16 7wEA==
- In-reply-to: <98007a1c-8cd4-f6bf-36c4-65f046e8bc17@gmx.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <98007a1c-8cd4-f6bf-36c4-65f046e8bc17@gmx.com>
On Dec 31, 10:49pm, Eric Cook wrote:
}
} The following code results in a single loop
}
} a=() b=(); for n in "${(@)a:^b}"; do typeset -p n; done
} typeset n=''
}
} My question is, would anyone expect that? or would the you expect
} nothing to expand, resulting in the loop not iterating?
The zip operation is stepping on the internal state that records the
semantics of (@)-inside-double-quotes, so it always behaves as if
you did "${a[*]:^b}" instead. Patch to zsh-workers, assuming gmail
doesn't get blocked again.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author