You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "dariocurr (via GitHub)" <gi...@apache.org> on 2026/07/22 10:39:48 UTC
[I] datafusion-cli: allow configuring the location of the interactive shell's history file [datafusion]
dariocurr opened a new issue, #23796:
URL: https://github.com/apache/datafusion/issues/23796
## Describe the bug
`datafusion-cli`'s interactive REPL hardcodes its rustyline history file as
the relative path `.history` (see `exec_from_repl` in
[`datafusion-cli/src/exec.rs`](https://github.com/apache/datafusion/blob/main/datafusion-cli/src/exec.rs)):
```rust
rl.load_history(".history").ok();
...
rl.save_history(".history")
```
Because the path is relative, the history file is created in whatever
directory the CLI happens to be launched from, so every working directory
silently accumulates its own hidden `.history` file, and there is no way to
point it somewhere else (e.g. a fixed location shared across sessions, or a
location outside the current directory when it's read-only).
## To Reproduce
Run `datafusion-cli` from two different directories and note that each gets
its own independent `.history` file, with no way to override the location.
## Expected behavior
Allow the history file location to be configured, e.g. via a `--history-file`
CLI flag (and/or an environment variable), while keeping the current
`.history` relative-path behavior as the default so existing workflows are
unaffected.
## Additional context
I have a small PR ready that adds a `--history-file <PATH>` flag and a
`DATAFUSION_HISTORY_FILE` environment variable (flag takes precedence),
without changing the existing default.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org