From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22234 invoked by alias); 2 Dec 2015 13:16:01 -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: 21024 Received: (qmail 24081 invoked from network); 2 Dec 2015 13:16:00 -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, HTML_MESSAGE,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=+JmFr74/RrmZ0E8HcoToegdHu3OknaL3k5GY1orUnUk=; b=k1sYqZ1aCSMNF7N65CdRl0dlH43R0UCYmQq83bgHaechfgWiWO1Bg3canhPjlCAdOl 3hxzsHIMbpDRi5z78LVcFE5ztek+2hfKv041rX2kS5iHSLAuBPaH6AR3oxhjwVFMNBQJ pNQyh1Iht3LURJGHz/e4vBK+fZVFiMUUd5tECeFszitOUiGZl/DBXU/z0mpjeGyPxIpo 6NTatCGY9DFb8/pyjuiXk5Yfayqq85icVUQeHJiPzATMHr6mqlADyVfmONFAvjWKP9vF RK2l5nOF6o++wps1lnhN7GTaidCvLO4drKIcPbdquuij4fjjecrPmAhcjIF/54a9m1qA tezQ== MIME-Version: 1.0 X-Received: by 10.182.241.3 with SMTP id we3mr2749032obc.9.1449062157191; Wed, 02 Dec 2015 05:15:57 -0800 (PST) In-Reply-To: <20151130031915.GD2504@tarsus.local2> References: <20151126080400.GA20074@linux.vnet.ibm.com> <565B723B.70900@gmail.com> <20151130031915.GD2504@tarsus.local2> Date: Wed, 2 Dec 2015 08:15:57 -0500 Message-ID: Subject: Re: Interactive search on the command line? From: Scott Frazer To: Daniel Shahaf Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=001a11c3608c2312410525ea1336 --001a11c3608c2312410525ea1336 Content-Type: text/plain; charset=UTF-8 On Sun, Nov 29, 2015 at 10:19 PM, Daniel Shahaf wrote: > I wouldn't know you were new to zsh if you didn't say so; the code looks > as good as anyone's. The one thing I would suggest is to use the > ${BUFFER[(i)$char]} syntax in the 'for' loop, which should translate to > a strchr() or strstr() call at the C level. (There's also the > ${(ps:$char:)BUFFER} syntax, but I'm not sure it gains you anything.) > > I tried the (i) thing but the function stopped working. I couldn't find what it was supposed to do in the zsh manual, only something about use as a flag for case-insensitive search which doesn't seem relevant. How do people debug these types of things? > Also, three minor points: > > - With recent zsh, WARN_CREATE_GLOBAL complains: > (anon):1: scalar parameter ZSH_JUMP_TARGET_CHOICES created globally in > function (anon) > (anon):2: scalar parameter ZSH_JUMP_TARGET_STYLE created globally in > function (anon) > The fix is to declare these parameters either global ('typeset -g') or > 'local'. > > - You could use 'region_highlight+=("foo bar baz")' to append to the array. > > - You might use an 'always' block to restore $orig_region_highlight. > > P.S. Perhaps you could throw a LICENSE file into that repository? > > Thanks for the feedback, I fixed all these things. Scott --001a11c3608c2312410525ea1336--