Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: reduce number of lines available for completion
Both problems maybe fixed:
function short-menu-complete {
{
local _saved_LINES="$LINES"
stty -F $TTY rows $((LINES/2))
COMPLETION_ACTIVE=1
zle menu-expand-or-complete
} always { # this is crucial - execute _after_ TRAPINT
COMPLETION_ACTIVE=0
stty -F $TTY rows "$_saved_LINES"
LINES="$_saved_LINES"
}
}
function TRAPINT {
if [[ $COMPLETION_ACTIVE = 1 ]]; then
COMPLETION_ACTIVE=0
fi
return 1
}
- the latter being redundant if not used for other things.
I don't like messing with stty, but DECSTBM seems to clear entire screen
when set.
BTW is there a better way to recognize running completion inside TRAPINT?
--
Tomasz Pala <gotar@xxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author