From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10196 invoked by alias); 18 Dec 2016 23:29:43 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22233 Received: (qmail 8573 invoked from network); 18 Dec 2016 23:29:43 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f46.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.46):SA:0(1.0/5.0):. Processed in 3.116349 secs); 18 Dec 2016 23:29:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=FREEMAIL_FROM,FREEMAIL_REPLYTO, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: linux.tech.guy@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 74.125.82.46 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to; bh=fELkO+TkeR6JoG9gx60wkqaBuQrNMFor13gUzDqz1cE=; b=kCLkvAhLciN2fRALUk7k5Oo4x1j2j6NLNqgPOd3w+kAMx4VvEJSpY0iKL9FFN+pgKy aRC45ETjTkkU+1+YTuyI4VJTYjNG/fQIpydmk9Exep+TrO2bNhNpTlKiEF/y2VhjryWw vzords26eTiYcmLB29kCLGqUIVxoJSlVSmA4O+AYgNsCyOF4ce3V1MB81yq4kEnqFyXC cvBlGNC0e5mNoSeo1etUfGZARBNLaHhoGL1P7/PZ46siUJeGBN1zvCXFKBPPBY/ESGXN rNPK3QCE3Y64WG4S2QlQZsRcgi8qvxbtvKAsBi9VSmhZmwpOk9FMDpJTtc+kTVh2E3Ej RWbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to; bh=fELkO+TkeR6JoG9gx60wkqaBuQrNMFor13gUzDqz1cE=; b=ZRY44Ycnfd0hu6xHVsRUnNKZDiiWk/GuxBdBMGTyIfoP9PKrD9XKCDxzHoa3WklQvu Xp9KpKVlXgnuhauWKsjw30oPKsIFaw12oGwmY3DW44YkyTGWNgN05S9Zdy0v1SZ7g2ZX DMusCw8gJaVrSVQOBRSW/9YxGDttJRA308ZLBNTBP8ji49UD44Pv0aoa5+4/saE+ajJd 3W4FC4w6eCRM6cMQA4OTD474vrwxBrNURNz/udi/c3moj53u+ffA1DXlY1WpJ3k/KkJ4 8wt/IKYFVJ+syHMkXsiJ5xxEob2iIAmsCBHukrUqrLhN4ZW7r0UDK7cdtPE6ciSUSXCv BRiA== X-Gm-Message-State: AIkVDXK/Og1bAwypMuBxnY9JXUoLnUVOsN4lnzYloOFFXoipFgVA0TrSgLxGFaJZGm+ZlITgP43Eq22xpLnLgg== X-Received: by 10.28.62.141 with SMTP id l135mr12244270wma.20.1482103771649; Sun, 18 Dec 2016 15:29:31 -0800 (PST) MIME-Version: 1.0 Reply-To: linuxtechguy@gmail.com In-Reply-To: References: From: Jim Date: Sun, 18 Dec 2016 17:29:31 -0600 Message-ID: Subject: Re: Apparent inconsistency in f/z expansion flags behavior To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=001a114a0104d45d590543f72ce7 --001a114a0104d45d590543f72ce7 Content-Type: text/plain; charset=UTF-8 On Sun, Dec 18, 2016 at 5:02 PM, Pablo Lalloni wrote: > Hello there! > > I'm seeing an unexpected (to me) difference in the behavior of these flags. > > Say you do something like: > > words=(${(z)$( > Which set words with the array of all the words in the file and that's > great. > > Then I try the f flag in place of z, expecting to get an array with the > file's lines: > > lines=(${(f)$( > But then I get an array with just one string containing all the lines > concatenated (no NLs). > > So... Is this expected? What I need to do to get the array of lines? > > Note that if you split the last assignment in 2 steps, it works as > expected: > > lines=$( lines=(${(f)lines}) > > Which is ok, but of course anybody would want to do it in one step, right? > > Cheers! > lines=("${(f)$(