且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Zsh菜单完成导致ZLE重置提示后出现问题

更新时间:2023-12-05 11:32:58

我发现了这种解决方法,基本上可以防止在菜单选择中调用重置提示":

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

TRAPALRM() {
    if [ "$WIDGET" != "complete-word" ]; then
        zle reset-prompt
    fi
}

请注意,complete-word对您而言可能有所不同;我在TRAPALRM调用中找到echo $WIDGET来找到它.

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