moovweb / gvm

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

Please stop polluting .bashrc. #446

Open Folaht opened 9 months ago

Folaht commented 9 months ago

I've seen applications pollute .bashrc before but this takes the cake.

I don't know of any application that fails to even function
without having a litany of scripts being loaded in .bashrc.

Maybe I'm wrong here, but I believe that putting anything down in .bashrc means that it will take more time to wait for the terminal to finish loading it's scripts each time I start a new terminal.
And I consider the terminal window to be one of the most crucial applications
that need to start quickly, besides the console and xkill.

Not only that, but you're also for whatever reason rewriting the 'cd' command.
And since there's a bug in it for some users, including me,
have to either turn off the application or stop using using 'cd'.

P.S. Before I get the message of choosing goenv over gvm from the goenv developer. goenv is only slightly better as it pollutes .bashrc as well, just not as bad as gvm.
Either one of you has got to do a better job.

----- [edit] -----

I've just discovered direnv. I think that somehow getting gvm to work with direnv would be the best solution.
This might look hypocritical of me as direnv also requires .bashrc to properly work,
but I take exception to theirs.
The way their application works I can only image as being per-shell-based, so it probably won't work when called in /etc/profile.d/direnv.sh or ~/.profile.

tschroeder13 commented 9 months ago

Hey, unfortunately on my freshly installed Ubuntu 20.04 (yes I know, but it is a company decision) this very one line in .bashrc leads to 'cd' command not working anyhow. :( BR Tobias

pavel-krush commented 1 month ago

Is there any way to disable this cd override? It works on my computer, but every cd takes two seconds which is unacceptable.

dffuller commented 1 month ago

I concur. Overriding important utility behavior is not the way.