From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14709 invoked by alias); 9 Jan 2013 10:34:10 -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: 17547 Received: (qmail 28108 invoked from network); 9 Jan 2013 10:33:57 -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.177 as permitted sender) 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== MIME-Version: 1.0 X-Received: by 10.50.202.73 with SMTP id kg9mr1046399igc.51.1357727632614; Wed, 09 Jan 2013 02:33:52 -0800 (PST) In-Reply-To: <20130109094054.021cbaa6@pwslap01u.europe.root.pri> References: <20130109094054.021cbaa6@pwslap01u.europe.root.pri> Date: Wed, 9 Jan 2013 16:03:52 +0530 Message-ID: Subject: Re: array matching: inconsistent behaviour ? From: rahul To: Peter Stephenson Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=f46d0447a2513e632c04d2d8991e --f46d0447a2513e632c04d2d8991e Content-Type: text/plain; charset=UTF-8 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] > 1 > % print $FOO[(ie)$y] > 2 > > pws > 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. -- rahul --f46d0447a2513e632c04d2d8991e--