Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Interactive search on the command line?
- X-seq: zsh-users 21050
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Interactive search on the command line?
- Date: Sat, 5 Dec 2015 17:38:02 +0100
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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==
- In-reply-to: <20151205100013.GC2092@tarsus.local2>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20151126080400.GA20074@linux.vnet.ibm.com> <565B723B.70900@gmail.com> <20151130031915.GD2504@tarsus.local2> <CAGjUN-TEPKNr3fKfUvL1JBtZN9y2jrw9m1kjstggEeR+12gjcA@mail.gmail.com> <20151203233926.GF1955@tarsus.local2> <151203165950.ZM13362@torch.brasslantern.com> <20151205100013.GC2092@tarsus.local2>
On Sat, Dec 5, 2015 at 11:00 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author