Error after open iTerm-zsh or Terminal
Asked Answered
C

3

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.

Custard answered 1/5, 2015 at 18:31 Comment(1)
shouldn't need the quotes around your pathSolmization
C
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.

Custard answered 2/5, 2015 at 20:19 Comment(0)
T
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
Tyro answered 28/4, 2020 at 23:35 Comment(0)
C
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.

Custard answered 2/5, 2015 at 20:19 Comment(0)
O
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'
Oletta answered 29/12, 2021 at 20:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.