Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
reduce number of lines available for completion
- X-seq: zsh-users 30191
- From: Tomasz Pala <gotar@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: reduce number of lines available for completion
- Date: Sun, 2 Feb 2025 19:27:31 +0100
- Archived-at: <https://zsh.org/users/30191>
- List-id: <zsh-users.zsh.org>
Hello,
I'm struggling with the idea to use only part of the screen for
completion results (namely menu-select). I'm using:
zstyle ':completion:*' menu select=long-list select=1
and the selection can take entire screen given enough possibilities -
I'm trying to avoid this. I've found complist code using zterm_lines
variable, which appears to be directly related to $LINES. So the idea
is to reduce $LINES for completion [e.g. LINES=$((LINES/2))] and then
restore the original value (saved in some temporary variable).
I cannot find the appropriate place for restoration... When I reduce
LINES in _main_complete, then it's halving with each use.
Can I attach anything to run _after_ .menu-select is being issued?
I mean something direcly related, not some (R)PS hackery with
session-wide variable storing original LINES (not to mention PS won't be
evaluated between successive completions).
Or maybe some other idea? I'd like completion to use between half and
third of the screen (alternatively: LINES-20).
I find such feature important especially since Linux console lost
scrollback buffer and now it's easy to simply loose all the context.
best regards
--
Tomasz Pala <gotar@xxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author