zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: sergio <sergio@outerface.net>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: prefix and join an array
Date: Tue, 28 Apr 2020 20:51:34 -0700	[thread overview]
Message-ID: <CAH+w=7Zz2BMgsGSSH5fT7m+fw=+xv9Z7h9UN5TW1FfDN3gYrUg@mail.gmail.com> (raw)
In-Reply-To: <559d4f41-ea3b-d56a-93f4-ff0326600f6c@outerface.net>

On Tue, Apr 28, 2020 at 7:15 PM sergio <sergio@outerface.net> wrote:
>
> Is it possible to prefix and join an array:
>
> % list=(a.tld b.tld c.tld)
> % print ${(j., .)(DNS:${^list})}

You almost had it:

% print ${(j., .)${:-DNS:${^list}}}

  reply	other threads:[~2020-04-29  3:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29  2:14 sergio
2020-04-29  3:51 ` Bart Schaefer [this message]
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='CAH+w=7Zz2BMgsGSSH5fT7m+fw=+xv9Z7h9UN5TW1FfDN3gYrUg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=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).