Skip to content

Commit 1a83de9

Browse files
committed
Make histfile (really) configurable.
Thanks to Philipp Winter who submitted the patch to the Debian bugtracker.
1 parent aa909d4 commit 1a83de9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bpython/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def __init__(self, scr, interp, statusbar=None, idle=None):
521521
if not OPTS.arg_spec:
522522
return
523523

524-
pythonhist = os.path.expanduser('~/.pythonhist')
524+
pythonhist = os.path.expanduser(OPTS.hist_file)
525525
if os.path.exists(pythonhist):
526526
with codecs.open(pythonhist, 'r', getpreferredencoding(),
527527
'ignore') as hfile:
@@ -2312,7 +2312,7 @@ def main_curses(scr, args, interactive=True, locals_=None):
23122312

23132313
repl.repl()
23142314
if OPTS.hist_length:
2315-
histfilename = os.path.expanduser('~/.pythonhist')
2315+
histfilename = os.path.expanduser(OPTS.hist_file)
23162316
with codecs.open(histfilename, 'w', getpreferredencoding(),
23172317
'ignore') as hfile:
23182318
hfile.writelines(repl.rl_hist[-OPTS.hist_length:])

0 commit comments

Comments
 (0)