gpt4 book ai didi

shell - 升级后 oh-my-zsh 错误 : ~/. oh-my-zsh/lib/misc.zsh:3: `then' 附近的解析错误

转载 作者:行者123 更新时间:2023-12-03 13:15:21 27 4
gpt4 key购买 nike

今天我升级了我的 oh-my-zsh,然后开始出现这个错误:
~/.oh-my-zsh/lib/misc.zsh:3: parse error near `then'

在这个文件中有这个shell循环......

## Load smart urls if available
for d in $fpath; do
if [[ -e "$url/d-quote-magic"]]; then
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
fi
done

我认为问题出在 if 条件内,但我没有 shell/zsh 技能:(
任何人都可以帮我解决这个问题吗?
非常感谢! :)

最佳答案

伊坦·赖斯纳 (Etan Reisner) 帮助我完成了他的评论。
You need a space between the " and the ]] in that if line.

所以我只添加一个空格 :') 并修复警告! :P

for d in $fpath; do
if [[ -e "$url/d-quote-magic" ]]; then
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
fi
done

再次感谢! :)

关于shell - 升级后 oh-my-zsh 错误 : ~/. oh-my-zsh/lib/misc.zsh:3: `then' 附近的解析错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30848107/

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