oh-my-zsh: bracketed-paste-magic:zle:47: not enough arguments for -U

Posted zhuxiaoxi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oh-my-zsh: bracketed-paste-magic:zle:47: not enough arguments for -U相关的知识,希望对你有一定的参考价值。

今天突然发现粘贴的时候就提示这个错误,通过查阅资料已经解决

解决方法

分析问题,是oh-my-zsh的bracketed-paste-magic功能出现了异常,并未找到更好的方法,暂时先禁用掉。

  • 修改 ~/.oh-my-zsh/lib/misc.zsh中下方这一段代码,全部注释掉。
# if [[ $ZSH_VERSION != 5.1.1 ]]; then
# for d in $fpath; do
# if [[ -e "$d/url-quote-magic" ]]; then
# if is-at-least 5.1; then
# autoload -Uz bracketed-paste-magic
# zle -N bracketed-paste bracketed-paste-magic
# fi
# autoload -Uz url-quote-magic
# zle -N self-insert url-quote-magic
# break
# fi
# done
# fi
参考资料:https://www.cnblogs.com/mengff/p/9460460.html https://www.v2ex.com/t/262240 https://stackoverflow.com/questions/25614613/how-to-disable-zsh-substitution-autocomplete-with-url-and-backslashes

以上是关于oh-my-zsh: bracketed-paste-magic:zle:47: not enough arguments for -U的主要内容,如果未能解决你的问题,请参考以下文章

安装oh-my-zsh失败,可按以下方式安装

安装 Zsh 及 Oh-my-zsh

CentOS7.5安装配置Oh-My-Zsh

Arch安装zsh以及通过 Oh-My-ZSH! 开源项目的配置

oh-my-zsh

Ubuntu 终端美化(oh-my-zsh)