Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Limiting height of completion menu
- X-seq: zsh-users 26238
- From: Vincent Bernat <bernat@xxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Limiting height of completion menu
- Date: Sat, 19 Dec 2020 22:05:01 +0100
- Archived-at: <https://zsh.org/users/26238>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-12/m3pn35a4n6.fsf%40luffy.cx>
- Authentication-results: zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=luffy.cx header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=pass header.from=luffy.cx; arc=none
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=luffy.cx; h=from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm2; bh= oFbELbkEzUQg/P3zgQTo6YJ1+NunYuPe4Hg6BPu2vHk=; b=lfH2snI2bW5Si40l chMYgRR68bWjjhsC0esTuJnbi/tTR+NMB0IhCeeDTDXWB2iy2E6qUiIj3z1acsZX ZiTrGhkeM5NKEMEtQtMJ2zZP8SQ5Wh945jDnKX2Av6Nc7LIzg2l0uUhHwg3vJxDv 4uwKGWT4Xkpqjvn40wgefMRzitmWYQKcSH2p/4g5s5QiUR2Hhz66wtglEkesmbeL h/cL7jr4Zf2PN/snajuHhmoY7VZWkSygdbeZSTV1WuAUZDcGItcwCVyqZ4NeewI0 DhdCq2paVs8U7glNq8NMrvHOMzKuaZ7dKH6o2KlBmpAVWU6/OqjDJ/t9AtYIzKd+ wF/q4w==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=oFbELbkEzUQg/P3zgQTo6YJ1+NunYuPe4Hg6BPu2v Hk=; b=QdKNaypQKy7FC+Sea7dQftYNHc/mx4h5L4EngBF/d+gLqJytynHJYG7/4 vrYGOx7fzIC9UTPUQT5snu/wsKKIYnm+NIO6tj6Xk3rP8i5wPLyFt66FhN6jC+hG YIQRDxDWBg+AKdShbZTmoC2knW7+7YlcXVeLar3E2VX91UCKKxLqR2vH9lny70ad 1+1xgmgTVI3epD6M3lMP8pGl6W4yyfwE0MBvzgF9CTCWfZMwmlae7y7G181qsKCp jziIsKCTUUg+YfrWMpLpvnMRb99TT3JiN2t76tzeYLg6NkrQqJ83J3MumpBT1AcT 0hCFhLLSmu0MIr9zoVFTaqEzJs3VQ==
- In-reply-to: <CAH+w=7amMkiuWYHdmCemo5sH+YAADF_drF=iHJ7Wpypv_zGwoQ@mail.gmail.com> (Bart Schaefer's message of "Sat, 19 Dec 2020 12:30:17 -0800")
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <m3tushaaq2.fsf@luffy.cx> <CAH+w=7amMkiuWYHdmCemo5sH+YAADF_drF=iHJ7Wpypv_zGwoQ@mail.gmail.com>
- Sender: zsh-users-request@xxxxxxx
❦ 19 décembre 2020 12:30 -08, Bart Schaefer:
>> I was wondering if it would have been possible to limit the height of
>> the completion menu. I am using:
>>
>> zstyle ':completion:*' menu yes=long select
>
> This seems to work:
>
> autoload add-zsh-hook
> autoload add-zle-hook-widget
> half-lines() {
> LINES=$((LINES/2))
> }
> full-lines() {
> # Force terminal query
> LINES=0
> }
> comp-lines() {
> full-lines
> compprefuncs=( half-lines )
> }
> add-zsh-hook preexec full-lines
> add-zle-hook-widget line-init comp-lines
Yes, it works great! Thanks!
--
Program defensively.
- The Elements of Programming Style (Kernighan & Plauger)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author