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

Re: make zstyle ignore both _* and __* commands



omg, you are absolutely right. It should do already this because of the
regex.
I'm so ashamed of myself.

All right, I did found a case where this does not work.

if I type d_[tab] it shows this: http://imgur.com/ZSBZHvp (notice the
__fast_highlight...)

here's my full zsh config:
https://github.com/ninrod/dotfiles/tree/master/zsh
here's the completion relevant part:
https://github.com/ninrod/dotfiles/blob/master/zsh/completions.zsh

again, here it is for completeness

autoload -Uz compinit && compinit -u

zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' matcher-list '' \
  'm:{a-z\-}={A-Z\_}' \
  'r:[^[:alpha:]]||[[:alpha:]]=** r:|=* m:{a-z\-}={A-Z\_}' \
  'r:[[:ascii:]]||[[:ascii:]]=** r:|=* m:{a-z\-}={A-Z\_}'

zstyle ':completion:*:functions' ignored-patterns '_*'

cheers,

Filipe

On Sun, Jul 2, 2017 at 2:20 PM, Peter Stephenson <
p.w.stephenson@xxxxxxxxxxxx> wrote:

> On Fri, 30 Jun 2017 18:39:18 -0300
> Filipe Silva <filipe.silva@xxxxxxxxx> wrote:
> > I have this line in my config, that tells zsh to ignore `_*` commands on
> > completions:
> >
> > zstyle ':completion:*:functions' ignored-patterns '_*'
> >
> > It works well. But I'd like to tell zsh to also ignore `__*' commands
> >
> > (double undescores)
> >
> > Is there a way to do that?
>
> It should already do that, for reasons I think ought to be
> self-explanatory (famous last words, I know).  Have you found some case
> where it doesn't?
>
> pws
>


Messages sorted by: Reverse Date, Date, Thread, Author