Bug report form
Describe the bug
The $env.config.history.path configuration option is completely ignored. Regardless of what custom path is set, Nushell always writes history to the $nu.history-path — both during the session (when sync_on_enter = true) and on exit (when sync_on_enter = false).
How to reproduce
In REPL prompt:
- Set a custom history path:
# Linux
> $env.config.history.path = "/dev/null"
## or "/home/username/tmp/nushell/"
## or "/home/username/tmphistory.txt"
# or Windows
> $env.config.history.path = "\\\\.\\NUL"
## or '\\.\NUL'
## or "C:\\Users\\username\\tmp\\nushell\\"
## or "C:\\Users\\username\\tmphistory.txt"
- Run commands:
> print "test"
> # test in common
- The history still write to
$nu.history-path
> open $nu.history-path
$env.config.history.path = '/home/username/tmphistory.txt'
print "test"
# test in common
> open $env.config.history.path
Error: nu::shell::io::file_not_found
× File not found
╭─[repl_entry #8:1:6]
1 │ open $env.config.history.path
· ────────────┬───────────
· ╰── File not found
╰────
help: '/home/username/tmphistory.txt' does not exist
> print $nu.history-path ; print $env.config.history.path
/home/username/.config/nushell/history.txt
/home/username/tmphistory.txt
Expected behavior
When $env.config.history.path is set to a custom path, Nushell should respect that setting and write history to the specified path. If the path is /dev/null/ on Linux or \\.\NUL on Windows (UNC path), no file should be created on disk.
Configuration
Linux
| key |
value |
| version |
0.112.2 |
| major |
0 |
| minor |
112 |
| patch |
2 |
| branch |
makepkg |
| commit_hash |
d80ee8c |
| build_os |
linux-x86_64 |
| build_target |
x86_64-unknown-linux-gnu |
| rust_version |
rustc 1.94.1 (e408947bf 2026-03-25) (Arch Linux rust 1:1.94.1-1) |
| cargo_version |
cargo 1.94.1 (29ea6fb6a 2026-03-24) (Arch Linux rust 1:1.94.1-1) |
| build_time |
2026-04-16 08:49:55 +00:00 |
| build_rust_channel |
release |
| allocator |
standard |
| features |
default, mcp, network, plugin, rustls-tls, sqlite, trash-support |
| installed_plugins |
|
| experimental_options |
example=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=false, native-clip=false, cell-path-types=false |
Windows
| key |
value |
| version |
0.112.2 |
| major |
0 |
| minor |
112 |
| patch |
2 |
| branch |
|
| commit_hash |
d80ee8c |
| build_os |
windows-x86_64 |
| build_target |
x86_64-pc-windows-msvc |
| rust_version |
rustc 1.92.0 (ded5c06cf 2025-12-08) |
| rust_channel |
1.92.0-x86_64-pc-windows-msvc |
| cargo_version |
cargo 1.92.0 (344c4567c 2025-10-21) |
| build_time |
2026-04-15 21:31:35 +00:00 |
| build_rust_channel |
release |
| allocator |
standard |
| features |
default, mcp, network, plugin, rustls-tls, sqlite, trash-support |
| installed_plugins |
|
| experimental_options |
example=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=false, native-clip=false, cell-path-types=false |
Bug report form
Describe the bug
The
$env.config.history.pathconfiguration option is completely ignored. Regardless of what custom path is set, Nushell always writes history to the$nu.history-path— both during the session (when sync_on_enter = true) and on exit (when sync_on_enter = false).How to reproduce
In REPL prompt:
$nu.history-pathExpected behavior
When
$env.config.history.pathis set to a custom path, Nushell should respect that setting and write history to the specified path. If the path is/dev/null/on Linux or\\.\NULon Windows (UNC path), no file should be created on disk.Configuration
Linux
Windows