-
Notifications
You must be signed in to change notification settings - Fork 121
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
Improve .irbrc
's loading behaviour
#674
Comments
Hello 👋 First time I'd love to contribute to give back to the community so I picked first part of the issue and made a PR. I feel like I'm walking in the dark a bit, but managed to test it on the "local"(github codespace) environment and it passes automatic tests as well. I wasn't able to verify the yamatanooroti due to codespace limitations - might get back to it on local environment next week. I'm extremely open to feedback - would love to contribute more to irb in the future! |
Since #859,
IMHO, only one irbrc file should be loaded at each "user level" and "project level". For example, if there are 4 files as below,
only How do you think about this? |
By the way, since #859,
|
I noticed 2 "surprising"
.irbrc
loading behaviour recently:Lack of hierarchy on rc file loading
Unlike many other tools that have "project level" and "user level" configurations, IRB only accepts a single
.irbrc
file through a fixed loading order.For example, it doesn't load
project/.irbrc
if~/.irbrc
is present.This is unintuitive to most users as popular tools like
Pry
orVS Code
both have "user level" and "project level" configurations. And they usually load "user level" configs first, and allow "project level" configs to override them..irb_history
is always placed at the same place as.irbrc
is definedThis is also not an intuitive design. Most of the time,
.irb_history
should not be inside the project folder. So the current reality is, if a project wants to define.irbrc
for all its developers,.irb_history
needs to be added to.gitignore
or the project needs to configureIRB.conf[:HISTORY_FILE]
(example).The text was updated successfully, but these errors were encountered: