Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: disable substring match on command name



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