Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: variable expansion inside string
- X-seq: zsh-users 24117
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Re: variable expansion inside string
- Date: Tue, 30 Jul 2019 15:23:16 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190730142319euoutp02ed6982f9334ba3174c82b8ca79651166~2NV5dQSVJ0286702867euoutp02_
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564496600; bh=/bMwu55eKEXg/7+BKeW2BptWyh3wh50eDw7ZJAdSAe0=; h=Subject:From:To:Date:In-Reply-To:References:From; b=ub6d3mm7XwFcKxhfbU/AhA2CQUjXlBLNfF/KCg3JrKbh5m/slqMx+NKGIYyHtmAJ1 PZtcd8pPxhd6+Er+oNEvNWycWGZ0/xA6Cx0TzGh0iq8EHFpP3EYNK8ZIjfRlH87hX8 6wrhlxc0wXzeJx+zXjYaHjUUH8l2hEbNSxKiM/9s=
- In-reply-to: <1564496130.5815.9.camel@samsung.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>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CGME20190730123021epcas1p21671587b575bd82a2512bcb1fa091563@epcas1p2.samsung.com> <CAP+y1xAZiPn1B-GDPZw27fzBMdXSHbr+N3cgJBjOe_MeKG=0vw@mail.gmail.com> <1564492687.5815.4.camel@samsung.com> <CAP+y1xBYuRoak6C07rP__sy6ycm2UF_SdChAH4_YvHCkGjGMEQ@mail.gmail.com> <1564496130.5815.9.camel@samsung.com>
On Tue, 2019-07-30 at 15:15 +0100, Peter Stephenson wrote:
> The nearest I can think of is:
>
> print -r -- "${(e):-$a}"
Or, actually, a straight
print -r -- "${(e)a}"
since you don't need to add any text to the variable substitution.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author