moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
10.38k stars 546 forks source link

Startup error when having `cd` already set as alias #463

Open ad-on-is opened 9 months ago

ad-on-is commented 9 months ago

I'm using zoxide which creates an alias for cd

This results in gvm throwing errors on startup of zsh.

/home/adonis/.gvm/scripts/env/cd:46: defining function based on alias `cd'
/home/adonis/.gvm/scripts/env/cd:46: parse error near `()'
MushiTheMoshi commented 3 months ago

did you find a fix for this?

viktornordling commented 3 months ago

I had this too, and just figured out how to solve it.

So the issue is that you already have an alias named cd. The solution is to either remove that alias, or just run unalias cd before that line. See https://stackoverflow.com/questions/76638009/zsh-script-is-throwing-a-syntax-error-parse-error-near.

viktornordling commented 3 months ago

Well, now I can't actually use cd at all, as in, when I type cd .. or cd any-dir, I don't actually change directory. FML, I give up.