Skip to content

Commit a3324d8

Browse files
authored
Merge branch 'main' into fix-prompt-typo
2 parents 030d235 + b0a41f5 commit a3324d8

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
## 1.14.5 - 2025-02-17
1+
2+
## TBD
3+
4+
### Features
5+
6+
* Make the history file location configurable. ([#206](https://github.com/dbcli/litecli/issues/206))
27

38
### Internal
49

510
* Fix typo `pormpt`to `prompt` in `special/llm.py`.
611

12+
713
## 1.14.4 - 2025-01-31
814

915
### Bug Fixes

litecli/liteclirc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ destructive_warning = True
1818
# %USERPROFILE% is typically C:\Users\{username}
1919
log_file = default
2020

21+
# history_file location.
22+
# In Unix/Linux: ~/.config/litecli/history
23+
# In Windows: %USERPROFILE%\AppData\Local\dbcli\litecli\history
24+
# %USERPROFILE% is typically C:\Users\{username}
25+
history_file = default
26+
2127
# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO"
2228
# and "DEBUG". "NONE" disables logging.
2329
log_level = INFO

litecli/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,10 @@ def run_cli(self):
352352
self.configure_pager()
353353
self.refresh_completions()
354354

355-
history_file = config_location() + "history"
355+
history_file = self.config["main"]["history_file"]
356+
if history_file == "default":
357+
history_file = config_location() + "history"
358+
history_file = os.path.expanduser(history_file)
356359
if dir_path_exists(history_file):
357360
history = FileHistory(history_file)
358361
else:

0 commit comments

Comments
 (0)