From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20881 invoked by alias); 9 Jan 2013 17:22:22 -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: 17550 Received: (qmail 28528 invoked from network); 9 Jan 2013 17:22:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.223.180 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Yj4pI5zERxQTOGRaM8M2C4dvXnpHquVxGxHjK9y0Di4=; b=IdwbKayObD718I/FqGU5IrnR/PZtM0TK/jbu2zPmKffhSL+KZOQ3qKyXwql2H22QMr kR7nBwxC9XeCc0TaQ2+v7WM6swR59uQizXvFq6g/89JWjd7lD++n7yjx/yuVnZiUFH6w XIBLqGiDFLMFqlQDDdeK6Yr/hIlxBJY6PNludwo1H+OOCCgQcL6tqwBgtAkOOLUJITf+ pX9Zx6kDjr1Cw5ga1P31hcy50PE1jrwJFD5RnvZv++l9uxf63GHri7uyJ2Wp34vEewYG fnpmT0fcnVlnUmJCBysRddKlE5YUaDLy8XXmg5Mn1Cy5y2Mr+0e8g6MkjQMTfskDAHE7 OXTw== MIME-Version: 1.0 In-Reply-To: <130109075626.ZM9484@torch.brasslantern.com> References: <20130109094054.021cbaa6@pwslap01u.europe.root.pri> <130109075626.ZM9484@torch.brasslantern.com> Date: Wed, 9 Jan 2013 22:23:25 +0530 Message-ID: Subject: Re: array matching: inconsistent behaviour ? From: rahul To: Bart Schaefer Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=e89a8f6438729c2cb704d2dde637 --e89a8f6438729c2cb704d2dde637 Content-Type: text/plain; charset=UTF-8 On Wed, Jan 9, 2013 at 9:26 PM, Bart Schaefer wrote: > On Jan 9, 4:03pm, rahul wrote: > } > } I've been using the "print -rC" to print in columns -- saves me from > quite > } a bit of programming. However, often the data has spaces in it, or tabs. > Of > } course, print will wrap/break on those. > > "print" doesn't do any wrapping/wordsplitting internally, so if you are > getting columns broken up on whitespace in the data, it's because of > command-line parsing. Change the way you quote the arguments to print. > Okay, great- I just tried out a one-liner and it works: print -rC2 -- "${(@f)$(brew list --versions)}" print -rC2 -- "${(@f)$(print -rl -- *(.) | nl)}" -- thx, rahul --e89a8f6438729c2cb704d2dde637--