Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: make zstyle ignore both _* and __* commands
- X-seq: zsh-users 22761
- From: Filipe Silva <filipe.silva@xxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: make zstyle ignore both _* and __* commands
- Date: Sun, 2 Jul 2017 18:37:14 -0300
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mKhQhMlacfxysR17yRAVuSrvEgfmv/tUyVWOrlmu4IU=; b=ovuDdfnHUfHFl9nuMRNnDUiOncTYzKSYFFIRpAhKJdrZD+pbhyfKlWaXxrOq2Q7Ehp U1wXIgrppjdBJqGwX4zMVfnMCObRr20xaO3GdHWVDi3Y1iXpfmxr5eStjICasSzp5e6M OKfEbRopCiHldy4J4CPQoTX0vkll+pV+UhiXp5qmwWLhW/j0zdVip2gsGDx1F9FXb5lQ Pbw4ota8nlbH4EdnnPa6RKsW0saepI4y0vtYndb1MmRUUKPCSZ9nAXMRg/doIuvte8HY bDl1WQo+6thxmTT6Vjzzc/AXHIjjuvaazK+aKlnSQkrQxZzO80ofY94ZlDxW3zcGwae0 2Pwg==
- In-reply-to: <20170702182042.2c129fde@ntlworld.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: <CAEwkUWPVcbXVk5Y3pOVt81GbV6Yr=haDLiphK9t=5dQKPpWOVg@mail.gmail.com> <20170702182042.2c129fde@ntlworld.com>
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