Zsh Mailing List Archive
Messages sorted by:
Re: array matching: inconsistent behaviour ?
- X-seq: zsh-users 17547
- From: rahul <rahul2012@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: array matching: inconsistent behaviour ?
- Date: Wed, 9 Jan 2013 16:03:52 +0530
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=PtIGzsoYY149aQfDR6FYvP4KAK1LluDT4JXvXzmEbfM=; b=TrGPCsWcPdQFwSMqJSs+rvCpeNiCS0a8XXAvHbMlAMbfnDKe+5KkeD4Jb0J6gD6JB/ yl4ggkqDyjq83nLjukQ8ccVZ0O4sc12AfHBwV1uXkm7IXn7LcXL9WGAOMtOofMuf1Khj 2v6hly6FcFOVK93x2d8Uly3jZ60XFiC8T+MG8WverUroRASznV2nl+1hpGIV3Ll9CfW0 6XlLMMrSz53YhojKtsgJl6lAmVsl0aKWD3wQ5mCh+ZYmnmVLrRDEUFBd9aJorgjMxAmE +HWuuYFX4la4lzIlq/vHf1V8NPGt5/T62CTG48kUoIQZSVTb/OYjIRAz85HbX9hl3PWL M5Rw==
- In-reply-to: <email@example.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CACQNQ9Mn8ydkZ5+EckXJ38ywV8iCxyqcBzVCTFSTH4bs6QNLBw@mail.gmail.com> <firstname.lastname@example.org>
On Wed, Jan 9, 2013 at 3:10 PM, Peter Stephenson
> You're not exactly doing anything wrong, but quoting here has alwas been
> a bit funny to allow (some forms of) pattern matching. To ensure an
> exact string match you can use the (e) flag...
> % print $FOO[(ie)$x]
> % print $FOO[(ie)$y]
My apologies. There's just so much zsh provides, it's difficult for a
newcomer to keep it all in the head even though I have printouts next to
me. You've done an awesome job with zsh!
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. So i found a hack to use "tr" to
replace spaces and tabs with ^a and ^b before feeding to "print" and then
doing the reverse after "print" gives the output. However, putting the
spaces back after "print" has done its formatting means that the alignment
is disturbed by the spaces.
I tried to change the IFS to newlines before calling print, but it seems
"print" does not use IFS to wrap/split lines into columns. Is there some
direct way to prevent "print -rC" from wrapping on spaces and tabs.
Messages sorted by: