0

I am not sure what I've set on my iTerm-zsh last night.

But after I open iTerm (zsh) or Terminal on my Mac or I try to use zsh, it will always show the following:

/Users/Simon/google-cloud-sdk/path.bash.inc:3: = not found`    
/Users/Simon/google-cloud-sdk/completion.bash.inc:18: command not found: complete
/Users/Simon/google-cloud-sdk/completion.bash.inc:29: parse error near `]]'

Any ideas that I can fix this ? Thanks in advance.

JL-HaiNan
  • 884
  • 8
  • 18

2 Answers2

3

I had same issue but accepted answer will remove any configuration on zsh. But You can fix by modifying bash_profile

vi ~/.bash_profile

change following

if [ -f '[PATH_TO_FOLDER]/google-cloud-sdk/path.bash.inc' ]; then . '[PATH_TO_FOLDER]/google-cloud-sdk/path.bash.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '[PATH_TO_FOLDER]/google-cloud-sdk/completion.bash.inc' ]; then . '[PATH_TO_FOLDER]/google-cloud-sdk/completion.bash.inc'; fi

to

if [ -f '[PATH_TO_FOLDER]/google-cloud-sdk/path.zsh.inc' ]; then . '[PATH_TO_FOLDER]/google-cloud-sdk/path.zsh.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '[PATH_TO_FOLDER]/google-cloud-sdk/completion.zsh.inc' ]; then . '[PATH_TO_FOLDER]/google-cloud-sdk/completion.zsh.inc'; fi

lastly run

source ~/.bash_profile
Zeedia
  • 321
  • 5
  • 16
0

Reset my zsh configuration, remove all instances of .zshrc and any .zshrc.??? swap files solve the problem :)

Command to reset -> rm -f ~/.zshrc*

Then close my terminal session and re-open, and I get the "new user" screen.

JL-HaiNan
  • 884
  • 8
  • 18