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.

1
  • shouldn't need the quotes around your path Commented May 1, 2015 at 18:33

3 Answers 3

4

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
Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

0

If you are using Big Sur try to execute these commands:

. '/your_installation_path/google-cloud-sdk/path.zsh.inc'
. '/your_installation_path/google-cloud-sdk/completion.zsh.inc'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.