-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Description
I found a .irb_history
file in my home dir. xdg-ninja
helpfully told me:
[irb history]: /Users/lgarron/.irb_history
In Ruby versions 2.7 or later, add the following to your .irbrc:
IRB.conf[:HISTORY_FILE] ||= File.join(ENV["XDG_DATA_HOME"], "irb", "history")
For prior versions, set $IRBRC
However, it didn't tell me where to put the .irbrc
. (Is the "For prior versions, set $IRBRC" part is even accurate?)
I had to look up what to do for .irbrc
, and it turns out you can put it at ~/.config/irb/irbrc
and irb
will use it.
However, xdg-ninja
's advice does not mention that:
[irb history]: /Users/lgarron/.irbrc
Export the following environment variable:
export IRBRC="$XDG_CONFIG_HOME/irb/irbrc"
I think it would be useful to:
- For
.irbrc
: Mention that you can move the.irbc
file to~/.config/irb/irbrc
(or$XDG_CONFIG_HOME/irb/irbrc
) without setting an env var. - For
.irb_history
: Either mention the same info for creating.irbrc
, or include some reference to info about.irbrc
that can be followed (e.g. a link).
Metadata
Metadata
Assignees
Labels
No labels