zsh-users
 help / color / mirror / code / Atom feed
From: sergio <sergio@outerface.net>
To: zsh-users@zsh.org
Subject: prefix and join an array
Date: Wed, 29 Apr 2020 05:14:06 +0300	[thread overview]
Message-ID: <559d4f41-ea3b-d56a-93f4-ff0326600f6c@outerface.net> (raw)

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.

             reply	other threads:[~2020-04-29  2:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29  2:14 sergio [this message]
2020-04-29  3:51 ` Bart Schaefer
2020-04-29  4:09   ` sergio
2020-04-29  4:22 Eric Nielsen
     [not found] <SC1P152MB1758B1DA12D7C4E477BB5C53EFAD0__34252.3257875413$1588134220$gmane$org@SC1P152MB1758.LAMP152.PROD.OUTLOOK.COM>
2020-04-30 16:45 ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559d4f41-ea3b-d56a-93f4-ff0326600f6c@outerface.net \
    --to=sergio@outerface.net \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).