Ryba Ryba - 1 year ago 63
Bash Question

Zsh menu completion causes problems after zle reset-prompt

I have following code in my .zshrc:

TRAPALRM() { zle reset-prompt }

After triggering menu completion all items from menu, except highlighted one disappear after
triggers and when i keep navigating in menu zsh segvaults after a short time

Is there any fix or workaround for this?

EDIT: zsh version is 5.0.2 on Linux Mint 17

EDIT: i observe same thing on zsh version 5.0.7 on Gentoo

Answer Source

I found this workaround, to basically prevent calling "reset-prompt" when in a menu selection :

    if [ "$WIDGET" != "complete-word" ]; then
        zle reset-prompt

Note that complete-word may be different for you; I found it with an echo $WIDGET in the TRAPALRM call.