From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25427 invoked by alias); 26 Feb 2013 18:16:31 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17653 Received: (qmail 9305 invoked from network); 26 Feb 2013 18:16:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL,UNPARSEABLE_RELAY autolearn=no version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.co.uk does not designate permitted sender hosts) 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= X-Yahoo-Newman-Id: 372379.77726.bm@smtp105.mail.ird.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: e.4P2tIVM1kxPOXVblYtDgUpm_7ZbXB5VjZNreS060MuG0n LBtc9BjeOq.SIQAk7v4VoUL4oNW.80UEaoaE8p6d4eEzsgYSfVIphRZcBARH plijEusNVr4.1.V0FTvp_2MXiQB5P5JCB.1GXYhp4Edc8NAxVajWMbe0zDLg lKHKEJ7ir.q7qUhZFlZCrZvmOJIPkxgYhUnx2aRnSdhvFC3Eeq1jk7jgKQDV mDo1jFHtZtCeiwVO2Dwpn6IKb_XngA2GAEgXYpNU2X1L58Jsy35Il601wrZI YyWbyw9a213i6mpxmmg3oz_VtKvPHJvnTpJOBBzBH8kD0ELt7aMqOAo7QAiJ 7M51PtHmjuP.lJ25TFoc7NHBuvYtIlxrPq8OZtlygzobM0rQWNpXl7veLUPE 7MwbU2jLaXOoGR_W55L4bt_JjpEClT1XPBbaKKZaoRAiiTA-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- cc: joe M In-reply-to: <130226092253.ZM4673@torch.brasslantern.com> From: Oliver Kiddle References: <130226092253.ZM4673@torch.brasslantern.com> To: zsh-users@zsh.org Subject: Re: Zsh completion configuration LISTMAX MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14616.1361902017.1@thecus.kiddle.eu> Date: Tue, 26 Feb 2013 19:10:19 +0100 Message-ID: <14666.1361902219@thecus.kiddle.eu> Bart wrote: > 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 like: 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 ignored-patterns. Oliver