Zsh Mailing List Archive
Messages sorted by:
Re: Zsh completion configuration LISTMAX
- X-seq: zsh-users 17653
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Zsh completion configuration LISTMAX
- Date: Tue, 26 Feb 2013 19:10:19 +0100
- Cc: joe M <joe9mail@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1361902234; bh=eFU9y62QyN4o06stpleiCHdDW8ViaI4xWFaiyOrsr0o=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:cc:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=1giWIhE4EftWuzhJvK5n/gFofTxQBdHhHpirn+87b/MOOHGLaCoD5A540KrH11xWHgPawX2Wg43DMMzNCvLtH19tko4dUJXiJYMYe2qLjTBRyd/Xn15/euojaMn8SrqFjx9Alje2/KyBOkb1cSEWqD2G17aetXNNvYxbecti2fA=
- In-reply-to: <130226092253.ZM4673@torch.brasslantern.com>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAHjjW17zbQbgjZsaYoK=+1DvB5DC1sduQ=zv35TMArV7n=J=0Q@mail.gmail.com> <130226092253.ZM4673@torch.brasslantern.com>
> If you actually want to eliminate some of the possible matches so that
> the list itself is shorter, you either need to reduce the number of
> words passed to compadd [difficult in general but possibly doable in
> a custom function like the _history_or_autocd example] or play with the
> tag-order / group-order styles to limit the sets of matches displayed.
> Others may have additional suggestions ...
There is also the hidden style which prevents certain matches from
appearing in the list. So for example, you might do the following to not
list usernames after ssh (but still complete them).
zstyle ':completion:*:ssh:*:users' hidden true
The style corresponds to compadd's -n option.
The nearest I can quickly get to limiting matches would be something
zstyle -e ':completion:*' hidden '(( compstate[nmatches] > 10 )) && reply=( true )'
That will not result in a maximum of 10 matches being listed, however
because the style is checked for groups of matches not individual ones.
It also doesn't discern between matches by their length.
It's probably better to combine the hidden style with tag-order and
Messages sorted by: