diff --git a/core/shell.py b/core/shell.py index ef8973f850..fcdb9088d6 100644 --- a/core/shell.py +++ b/core/shell.py @@ -609,8 +609,15 @@ def Main(lang, arg_r, environ, login_shell, loader, line_input): debug_f, line_input) # type: comp_ui._IDisplay else: display = comp_ui.MinimalDisplay(comp_ui_state, prompt_state, debug_f) + if 'HISTFILE_%s' % lang.upper() in environ: + history_filename = environ.get('HISTFILE_%s' % lang.upper()) + elif 'XDG_DATA_HOME' in environ: + history_filename = os_path.join( + environ.get('XDG_DATA_HOME'), 'oil/history_%s' % lang) + else: + history_filename = os_path.join( + home_dir, '.local/share/oil/history_%s' % lang) - history_filename = os_path.join(home_dir, '.config/oil/history_%s' % lang) comp_ui.InitReadline(line_input, history_filename, root_comp, display, debug_f) if mylib.PYTHON: diff --git a/oil-version.txt b/oil-version.txt index 0ed0e932f2..fb980ffe5f 100644 --- a/oil-version.txt +++ b/oil-version.txt @@ -1,6 +1,5 @@ 0.12.9 - # The first line of this file is the Oil version, and the rest is ignored. -# It's used at build time for the release tarball, and at runtime for oil +# It's used at build time for the release tarball, and at runtime for oil # --version / osh --version.