`cd` command is slow
amorey opened this issue · 2 comments
amorey commented
Thanks for making such a useful tool!
I noticed that the cd
command slowed down significantly after installing gvm and I tracked down the issue to this script: $GVM_ROOT/scripts/env/cd
. I understand the need for overloading cd
but it would be helpful if the function ran faster or alternatively if there was a way to opt-in or opt-out. In my case I'm just using the global go version and most of my use of cd
is not go-related so the extra cycles aren't necessary.
Here's my setup:
zsh 5.9 (x86_64-apple-darwin23.0)
gvm v1.0.22
macOS 14.5
irake99 commented
If you don't need go version auto-switching on cd, there is a workaround command unset cd
to un-overloading cd.
You can put this command into ~/.bash_profile
or ~/.zprofile
.
amorey commented
Thanks! I had to add "-f" but this worked:
[[ -s "/path/to/home/.gvm/scripts/gvm" ]] && source "/path/to/home/.gvm/scripts/gvm"
unset -f cd