Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
prefix and join an array
- X-seq: zsh-users 24811
- From: sergio <sergio@xxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: prefix and join an array
- Date: Wed, 29 Apr 2020 05:14:06 +0300
- Autocrypt: addr=sergio@xxxxxxxxxxxxx; keydata= mDMEXLyVzxYJKwYBBAHaRw8BAQdAy/UsenszHXsHnEZiSpfBzZyeWb6qbynuzv17TGu9veC0 HXNlcmdpbyA8c2VyZ2lvQG91dGVyZmFjZS5uZXQ+iJAEExYIADgWIQTC4uvf+9QEyYOC12re D4sZRoN9nQUCXLyVzwIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRDeD4sZRoN9nZ35 AQDzvj+ynX/ov7pE0cPMEhWV0RhwC6zx49/pJ4MjS+AG8AEArVLnHVsEE7/DZXrMcek+mQ+/ KNtx+L4+4mZqEvEwwAC4OARcvJXPEgorBgEEAZdVAQUBAQdAnFIZ3vDnqTkqaZZmPEQu3LDG yaXwbBQ/zoikbGtwrl0DAQgHiHgEGBYIACAWIQTC4uvf+9QEyYOC12reD4sZRoN9nQUCXLyV zwIbDAAKCRDeD4sZRoN9nfZ/AQDj4O2yuYqoPxlxY8ZJf81tK7+ahI8k7R4cJO8U7BfwKwEA oZxDYG1KsaBEbAXmjxUL0sV7YnP1I0/bkqUyTQP7EQE=
- 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
Hello.
Is it possible to prefix and join an array:
% list=(a.tld b.tld c.tld)
% tmp=(DNS:${^list})
% print ${(j., .)tmp}
DNS:a.tld, DNS:b.tld, DNS:c.tld
but directly, without tmp, something like:
% print ${(j., .)(DNS:${^list})}
--
sergio.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author