Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaks chruby #44

Open
grosser opened this issue Nov 28, 2022 · 2 comments
Open

breaks chruby #44

grosser opened this issue Nov 28, 2022 · 2 comments

Comments

@grosser
Copy link

grosser commented Nov 28, 2022

I'm using chruby which adds some cd integration to switch ruby versions when changing directories
using both makes chruby no longer switch ruby versions 😢

https://github.com/postmodern/chruby

@ddworken
Copy link
Owner

Hmm, I installed chruby to try to reproduce this and I wasn't able to. So a few questions:

  • What version of chruby do you have installed? If it isn't the latest, have you tried upgrading to the latest?
  • What shell/OS are you using? And what version of each?

@grosser
Copy link
Author

grosser commented Dec 18, 2022

chruby 0.3.9
bash 5.2.12

  • it works when chruby is loaded after history
  • it works when both are loaded from the same file
  • it does not work when chruby is loaded from a different file before history
source chruby.sh
# Hishtory Config:
# install via https://github.com/ddworken/hishtory
export PATH="$PATH:/Users/mgrosser/.hishtory"
source /Users/mgrosser/.hishtory/config.sh

with

# chruby.sh
  source /opt/homebrew/opt/chruby/share/chruby/chruby.sh
  RUBIES+=(~/.rbenv/versions/*)
  source /opt/homebrew/opt/chruby/share/chruby/auto.sh

... that is wild ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants