reduce number of lines available for completion
Tomasz Pala <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>