From: Dave Woodfall <dave@tty1.uk>
To: zsh-users@zsh.org
Subject: Re: Is it possible to limit the height or rows of menus?
Date: Sun, 5 Apr 2020 22:29:35 +0100 [thread overview]
Message-ID: <20200405212935.GB9554@blackswan.r0t.uk> (raw)
In-Reply-To: <20200405150012.GD32510@blackswan.r0t.uk>
On 2020-04-05 16:00,
Dave Woodfall <dave@tty1.uk> put forth the proposition:
> On 2020-04-05 15:38,
> Dave Woodfall <dave@tty1.uk> put forth the proposition:
> > zsh 5.6.2
> >
> > When using menu select with a command that has many options, all rows
> > in the terminal may be filled, and the context is lost (i.e. any
> > previous commands and their output disappear past the top of the
> > terminal, so needing to scroll back up to see them.)
> >
> > What I would like to do is limit the number of rows.
> >
> > I tried doing something like:
> >
> > LINES=10 grep -<tab>
>
> And typically, after asking a question we find the solution
> ourselves. I defined a custom function that contains:
>
> LINES=15 zle complete-word
I spoke too soon.
It looks using a custom function bound to the tab key causes some
problems, even without setting LINES.
Now when I get to the end and cycle back to the top, the prompt goes
up and overwrites the previous line.
This is what I'm using:
zle -N _vi-tab
_vi-tab() {
LINES=15 zle complete-word
}
bindkey '\t' _vi-tab
Any ideas?
--
Dave
next prev parent reply other threads:[~2020-04-05 21:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 14:38 Dave Woodfall
2020-04-05 15:00 ` Dave Woodfall
2020-04-05 18:28 ` Bart Schaefer
2020-04-05 22:13 ` Dave Woodfall
2020-04-05 23:35 ` Dave Woodfall
2020-04-05 21:29 ` Dave Woodfall [this message]
2020-04-06 8:57 ` Dave Woodfall
2020-04-06 11:49 ` Mikael Magnusson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200405212935.GB9554@blackswan.r0t.uk \
--to=dave@tty1.uk \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).