Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Upcoming (TBD)
==============

Bug Fixes
---------
* Respect `history_file` setting in the `[main]` section of `~/.myclirc`.


1.72.1 (2026/05/11)
==============

Expand Down
2 changes: 1 addition & 1 deletion mycli/main_modes/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def complete_while_typing_filter() -> bool:


def _create_history(mycli: 'MyCli') -> FileHistoryWithTimestamp | None:
history_file = os.path.expanduser(os.environ.get('MYCLI_HISTFILE', mycli.config.get('history_file', '~/.mycli-history')))
history_file = os.path.expanduser(os.environ.get('MYCLI_HISTFILE', mycli.config['main'].get('history_file', '~/.mycli-history')))
if dir_path_exists(history_file):
return FileHistoryWithTimestamp(history_file)

Expand Down
2 changes: 1 addition & 1 deletion test/pytests/test_main_modes_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def make_repl_cli(sqlexecute: Any | None = None) -> Any:
cli.post_redirect_command = None
cli.logfile = None
cli.smart_completion = False
cli.config = {'history_file': '~/.mycli-history-testing'}
cli.config = {'main': {'history_file': '~/.mycli-history-testing'}}
cli.key_bindings = 'emacs'
cli.wider_completion_menu = False
cli.login_path = None
Expand Down
2 changes: 1 addition & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def make_bare_mycli() -> Any:
cli.emacs_ttimeoutlen = 1.0
cli.vi_ttimeoutlen = 1.0
cli.beep_after_seconds = 0.0
cli.config = {'history_file': '~/.mycli-history-testing'}
cli.config = {'main': {'history_file': '~/.mycli-history-testing'}}
cli.output = lambda *args, **kwargs: None # type: ignore[assignment]
cli.echo = lambda *args, **kwargs: None # type: ignore[assignment]
cli.log_query = lambda *args, **kwargs: None # type: ignore[assignment]
Expand Down