From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22133 invoked from network); 13 Apr 2004 18:21:00 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Apr 2004 18:21:00 -0000 Received: (qmail 9907 invoked by alias); 13 Apr 2004 18:20:44 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7347 Received: (qmail 9876 invoked from network); 13 Apr 2004 18:20:44 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 13 Apr 2004 18:20:44 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 13 Apr 2004 18:20:44 -0000 Received: (qmail 2519 invoked from network); 13 Apr 2004 18:20:44 -0000 Received: from main.gmane.org (80.91.224.249) by a.mx.sunsite.dk with SMTP; 13 Apr 2004 18:20:42 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BDSWY-0005fW-00 for ; Tue, 13 Apr 2004 20:20:42 +0200 Received: from hippo.asfast.com ([216.182.10.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Apr 2004 20:20:42 +0200 Received: from ljz by hippo.asfast.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Apr 2004 20:20:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: Lloyd Zusman Subject: Re: Subscripting without temporaries Date: Tue, 13 Apr 2004 14:17:08 -0400 Message-ID: References: <20040413120053.GA4420@DervishD> <040413082948.ZM20696@candle.brasslantern.com> <20040413171142.GA28592@globnix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: hippo.asfast.com User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:pkqwu/2TSyb8KbgAQUI0AgJHjCk= Sender: news X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Phil Pennock writes: > On 2004-04-13 at 12:40 -0400, Lloyd Zusman wrote: >> > txt="Some text [particular text] Another text" >> > print -l $txt[1,$txt[(i)\[]-2] $txt[(r)\[,(R)\]] $txt[$txt[(I)\]]+2,-1] >> >> This is cool. But what options are necessary in order to make this >> work? The commands above produce this output for me: >> >> Some >> text >> [particular >> text] >> Another >> text >> >> This is the same as what I get with this: >> >> print -l $txt > > That means that you have SH_WORD_SPLIT turned on, which is not a zsh > default. I'm not sure why, but I had long ago turned on SH_WORD_SPLIT and forgot about it. I turned it off, and now this works as advertised. Thanks! > [ ... ] -- Lloyd Zusman ljz@asfast.com