ruby/irb

Warn when specified history file's directory does not exist

tompng opened this issue · 0 comments

tompng commented

Description

When the history file is specified by irbrc

IRB.conf[:HISTORY_FILE] = '/dir/does/not/exist/irb_history'

And the directory does not exist, IRB fails to save history at exit.
While loading history, it's better to warn when history dir does not exist.

Originally reported in #828

Behavior of other tools

Pry creates directory by FileUtils.mkdir_p.
bash, sh, zsh does not create directory.

To avoid unintentionally creating directory (example: directory has typo), I think only show warning is better.