Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Interactive search on the command line?
- X-seq: zsh-users 21024
- From: Scott Frazer <frazer.scott@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Interactive search on the command line?
- Date: Wed, 2 Dec 2015 08:15:57 -0500
- Cc: 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=+JmFr74/RrmZ0E8HcoToegdHu3OknaL3k5GY1orUnUk=; b=k1sYqZ1aCSMNF7N65CdRl0dlH43R0UCYmQq83bgHaechfgWiWO1Bg3canhPjlCAdOl 3hxzsHIMbpDRi5z78LVcFE5ztek+2hfKv041rX2kS5iHSLAuBPaH6AR3oxhjwVFMNBQJ pNQyh1Iht3LURJGHz/e4vBK+fZVFiMUUd5tECeFszitOUiGZl/DBXU/z0mpjeGyPxIpo 6NTatCGY9DFb8/pyjuiXk5Yfayqq85icVUQeHJiPzATMHr6mqlADyVfmONFAvjWKP9vF RK2l5nOF6o++wps1lnhN7GTaidCvLO4drKIcPbdquuij4fjjecrPmAhcjIF/54a9m1qA tezQ==
- In-reply-to: <20151130031915.GD2504@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>
On Sun, Nov 29, 2015 at 10:19 PM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author