mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 03:20:21 +02:00
Add warning when using history isolation with non-SQLite history format (#16151)
# Description This PR depends on #16147, use `git diff 132ikl/shell-warning 132ikl/isolation-warn` to see only changes from this PR People seem to get tripped up by this a lot, and it's not exactly intuitive, so I added a warning if you try to set `$env.config.history.isolation = true` when using the plaintext file format: Warning: nu:🐚:invalid_config ⚠ Encountered 1 warnings(s) when updating config Warning: nu:🐚:incompatible_options ⚠ Incompatible options ╭─[source:1:33] 1 │ $env.config.history.isolation = true · ──┬─ · ╰── history isolation only compatible with SQLite format ╰──── help: disable history isolation, or set $env.config.history.file_format = "sqlite" # User-Facing Changes * Added a warning when using history isolation without using SQLite history. # Tests + Formatting Added a test
This commit is contained in:
@ -168,3 +168,11 @@ fn mutate_nu_config_plugin_gc_plugins() -> TestResult {
|
||||
"0sec",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mutate_nu_config_history_warning() -> TestResult {
|
||||
fail_test(
|
||||
r#"$env.config.history.file_format = "plaintext"; $env.config.history.isolation = true"#,
|
||||
"history isolation only compatible with SQLite format",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user