美文网首页
bracketed-paste-magic:zle:47: no

bracketed-paste-magic:zle:47: no

作者: 煮梦斋_bioinfo | 来源:发表于2020-05-28 10:33 被阅读0次

Ubuntu18.04中oh-my-zsh报错:
bracketed-paste-magic:zle:47: not enough arguments for -U
先查看zsh版本,早期版本和新版本不一致

zsh --version

新版本解决办法(此处对应是zsh 5.4.2 (x86_64-ubuntu-linux-gnu))

打开zsh.sh

vim $ZSH/oh-my-zsh.sh

添加

DISABLE_MAGIC_FUNCTIONS=true

然后保存退出后,运行下列代码就可以使用

source $ZSH/oh-my-zsh.sh

早期版本解决办法 (版本5.1.1)

找到misc.zsh

vim ~/.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://stackoverflow.com/questions/25614613/how-to-disable-zsh-substitution-autocomplete-with-url-and-backslashes

相关文章

网友评论

      本文标题:bracketed-paste-magic:zle:47: no

      本文链接:https://www.haomeiwen.com/subject/suroahtx.html