mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-24 19:44:21 +01:00
Before this change, the history was only saved when the shell was interrupted (e.g., Ctrl-C pressed twice). With this change, history is now also saved when the `.exit` or `.quit` commands are used. I attempted to add shell tests to cover the changes introduced in this PR, but emulating a terminal/TTY that would work cross-platform seems to require significant changes to `TestLimboShell` and `LimboShell`. For example, the `pty` module [currently doesn't support Windows](https://bugs.python.org/issue41663). I'm open to experimenting, but I’m unsure if complicating these classes is worthwhile, as saving history doesn't seem to be critical. Additionally, it might be worth considering a refactor of the CLI so that exit and cleanup operations are performed in one place. Reviewed-by: Preston Thorpe (@PThorpe92) Closes #1414