Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(eval):1 parse error near 'then'

Tags:

oh-my-zsh

I am getting an error of (eval):1 parse error near 'then' when I used zsh's command 'source .zshrc'.

~ source .zshrc
(eval):1: parse error near `then'

this is my .zshrc file:

export ZSH=/Users/chourongqishi/.oh-my-zsh
export PATH=${PATH}:/usr/local/mysql/bin
export PATH=${PATH}:/usr/local/bin
export JAVA_HOME=/usr/libexec/java_home
export
PATH=${PATH}:${JAVA_HOME}:${ANDROID_SDK_ROOT}:${ANDROID_SDK_ROOT}
/platform-tools:${ANDROID_SDK_ROOT}/tools:${JAVA_HOME}:${JAVA_HOME}/bin
export PATH=${PATH}:/Users/chourongqishi/Library/Android/sdk/platform-
tools
export PATH=${PATH}:/Users/chourongqishi/Library/Android/sdk/tools
plugins=(git)
source $ZSH/oh-my-zsh.sh
source ~/.bash_profile
alias cls='clear'
alias -s html=subl
alias -s txt=subl
alias -s java=subl
alias -s xml=subl
like image 701
ChrongLiu Avatar asked Nov 16 '25 17:11

ChrongLiu


1 Answers

The error comes from the source directive which you use. The source directive will execute the files they are provided, within the context of the current script.

You use source ~/.bash_profile. This file is a bash script, you are trying to execute it in zsh.

This is where your problem comes from: ensure you do not import files made for other shell programs.

like image 174
Fabien Avatar answered Nov 18 '25 21:11

Fabien