Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: disable substring match on command name
- X-seq: zsh-users 18551
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Re: disable substring match on command name
- Date: Mon, 03 Mar 2014 18:25:10 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1393867511; bh=NIj5lBRzraUoGQWK8nGvT/zNyS4T494bbGGCH6vkTnA=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Received:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=MGaRlCk1i9IZweTJs7trKzr2JeyYWWXwA9tI7vm6FWmS8Ja9Nw5O8lYWrsVptmtZZjJ3se4aAHrPa227P04FJITpBIHO5iOWp5W4IWtQMBQxWcX2A2/tw6HOlmcqLeqbJhZ9uE9KzYfP0bWV/bQXDUeDOWKESjpmgFy/3IDdUtc=
- In-reply-to: <140302121855.ZM1118@torch.brasslantern.com>
- 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: <1393780084.43996.YahooMailNeo@web194601.mail.sg3.yahoo.com> <140302121855.ZM1118@torch.brasslantern.com>
Bart wrote:
> zstyle -e ':completion:*' matcher-list \
> 'zstyle -a "word-${CURRENT}:completion:$curcontext" matcher-list reply'
That's very nifty. I wouldn't even call "hackish". You're just allowing
pattern matching to extend to fields that aren't in the standard list.
My only comment is that I'd be inclined to add the custom context
component at the end rather than the beginning.
> zstyle -e ':completion:*' matcher-list \
> 'zstyle -a "word-${CURRENT}$LOOKUP" "$STYLE" reply'
>
> The example names LOOKUP and STYLE are probably not the best choices.
How about simply adding an option for chained styles so you might have:
zstyle -c ':completion:*' matcher-list "word-$CURRENT"
Admittedly, it'd be slightly less flexible.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author