Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

oh-my-zsh error after upgrade: ~/.oh-my-zsh/lib/misc.zsh:3: parse error near `then'

today I upgrade my oh-my-zsh and then start this error: ~/.oh-my-zsh/lib/misc.zsh:3: parse error near `then'

Inside this file there is this shell loop...

## 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

I think the problem it's inside the if condition, but I don't have shell/zsh skills :( Could anyone can help me with this? Thanks a lot! :)

like image 541
Thiago Medeiros Avatar asked Jun 15 '15 14:06

Thiago Medeiros


2 Answers

Etan Reisner help me out with his commentary. You need a space between the " and the ]] in that if line.

So I just add a space :') and fix the warning! :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

Thanks again! :)

like image 97
Thiago Medeiros Avatar answered Sep 18 '22 02:09

Thiago Medeiros


Use upgrade_oh_my_zsh upgrade to the latest version.

This issue fix here

like image 26
ERU Avatar answered Sep 20 '22 02:09

ERU