From: rahul <rahul2012@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: array matching: inconsistent behaviour ?
Date: Wed, 9 Jan 2013 22:23:25 +0530 [thread overview]
Message-ID: <CACQNQ9PeZ4YcVtNExqu56ogzHsjiy1tozdAoJKsoJ4APBD4Kvw@mail.gmail.com> (raw)
In-Reply-To: <130109075626.ZM9484@torch.brasslantern.com>
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
On Wed, Jan 9, 2013 at 9:26 PM, Bart Schaefer <schaefer@brasslantern.com>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
prev parent reply other threads:[~2013-01-09 17:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 6:30 rahul
2013-01-09 9:35 ` Han Pingtian
2013-01-09 10:23 ` rahul
2013-01-09 9:40 ` Peter Stephenson
2013-01-09 10:33 ` rahul
2013-01-09 15:56 ` Bart Schaefer
2013-01-09 16:53 ` rahul [this message]
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=CACQNQ9PeZ4YcVtNExqu56ogzHsjiy1tozdAoJKsoJ4APBD4Kvw@mail.gmail.com \
--to=rahul2012@gmail.com \
--cc=schaefer@brasslantern.com \
--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).