gpt4 book ai didi

10.9 : widgets can only be called when ZLE is active 上的 ZSH

转载 作者:行者123 更新时间:2023-12-03 20:58:00 25 4
gpt4 key购买 nike

我是 ZSH 的新手,并且一直在使用 oh-my-zsh 在 OSX 10.9 上朗姆酒 ZSH。我一直在尝试利用历史插件,但我明白了,“只有在 ZLE 处于事件状态时才能调用小部件。”当调用任何与历史相关的命令时。我一直在寻找一种方法来规避这一点,但一直无法找到解决方案。

最佳答案

它是 bugoh-my-zsh .要修复它,请将其放入您的 .zshrc :

TRAPWINCH() {
zle && { zle reset-prompt; zle -R }
}

解释:

With no options and no arguments, only the return status will be set. It is zero if ZLE is currently active and widgets could be invoked using this builtin command and non-zero otherwise. Note that even if non-zero status is returned, zle may still be active as part of the completion system; this does not allow direct calls to ZLE widgets.

关于10.9 : widgets can only be called when ZLE is active 上的 ZSH,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20357441/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com