From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21515 invoked by alias); 5 Dec 2015 16:38:09 -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: 21050 Received: (qmail 6873 invoked from network); 5 Dec 2015 16:38:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 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=hjPkfwR3org6FoZrzRsgtrqdM7gz/9Gni+yl2lgvq1s=; b=pahCvNCi9kHe4xHbw/2jKNNieZYXga26vjihpGpLBHs3yp+b/4cGLkceD4+LqfYwHF Wwu5WDFXtfx5ZaX6n7GpqAOE56Pe1MbPLMG0ybDy77oVf0osK5m09ZbDZ9dIutC2c57e b91k4n2vY3VaWajP7D57jzTDF2/niADcdVAeJfx15ejx/Iy6HmTwNKqqv+WfHm1WObDZ EFr+aSothKHSPVh4XREcZRk1GFkPgckN9BmregYAgcSxukM3ZuDpP7zVflF49y3xq54m thKwzAkdfhoI3Pz92b1wyDAazID0FUwhNkDESM/1j5pI12a26JL3lmVmTEwZCfzyaEuF 4kmg== MIME-Version: 1.0 X-Received: by 10.55.74.145 with SMTP id x139mr27182136qka.9.1449333482537; Sat, 05 Dec 2015 08:38:02 -0800 (PST) In-Reply-To: <20151205100013.GC2092@tarsus.local2> References: <20151126080400.GA20074@linux.vnet.ibm.com> <565B723B.70900@gmail.com> <20151130031915.GD2504@tarsus.local2> <20151203233926.GF1955@tarsus.local2> <151203165950.ZM13362@torch.brasslantern.com> <20151205100013.GC2092@tarsus.local2> Date: Sat, 5 Dec 2015 17:38:02 +0100 Message-ID: Subject: Re: Interactive search on the command line? From: Mikael Magnusson To: Daniel Shahaf Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Sat, Dec 5, 2015 at 11:00 AM, Daniel Shahaf wrote: > Bart Schaefer wrote on Thu, Dec 03, 2015 at 16:59:50 -0800: >> On Dec 3, 11:39pm, Daniel Shahaf wrote: >> } % () { >> } local haystack="$1" > ... >> >> % () { >> local haystack=$1 needle=$2 > ... >> (I also removed all redundant quotes and braces, since the original >> would only work in native zsh emulation anyway.) > > The quotes are not redundant; they are required for compatibility with > zsh-5.0.8 and older. (Those releases predate the upgrade of 'local' to > a reserved word, and, without the quotes, would perform word splitting > before the assignment.) Zsh doesn't wordsplit unquoted parameters and if it ever did, it was probably before any of us were born. You may be confusing the above with the $(foo) syntax which does wordsplit when unquoted. -- Mikael Magnusson