Bug report form
Describe the bug
Long story short: this should not be necessary / automatic. When these variables are set as strings, as they just ARE. Nushell fails on them. Nushell expect a list of strings for commands with flags or subcommands. But in these cases It's not very intuitive
#env.nu
# Fix for broken editor integration in Nushell.
#
# Our environment exports VISUAL/EDITOR as a command plus arguments (e.g.
# "codium --wait"), which zsh splits implicitly but Nushell treats as a single
# program name. Nushell's built-in `config` command (and similar) expect the
# editor as a list like ['codium', '--wait'], so split on spaces and keep the
# command together with all its switches.
$env.EDITOR = ($env.EDITOR? | default "nano" | str trim | split row " " | where {|el| $el != "" })
$env.VISUAL = ($env.VISUAL? | default "codium --wait" | str trim | split row " " | where {|el| $el != "" })
$env.SUDO_EDITOR = ($env.VISUAL? | default "codium --wait" | str trim | split row " " | where {|el| $el != "" })
How to reproduce
❯ $env.VISUAL = "codium --wait"
~
❯ config nu
Error: nu::shell::external_command
× External command failed
╭─[repl_entry #10:1:1]
1 │ config nu
· ────┬────
· ╰── `codium --wait` not found
╰────
help: Failed to find the editor executable
~
❯
~
❯ $env.VISUAL = [ "codium" "--wait" ]
~
❯ config nu # works
Expected behavior
Nushell expect a list of strings for commands with flags or subcommands. But in these cases It's not very intuitive
Configuration
version | transpose key value | to md --pretty
| key |
value |
| version |
0.114.2-nightly.7 |
| major |
0 |
| minor |
114 |
| patch |
2 |
| pre |
nightly.7 |
| branch |
nightly |
| commit_hash |
c41a2b62abe465393be68734dcdc27273672b75e |
| build_os |
linux-x86_64 |
| build_target |
x86_64-unknown-linux-musl |
| rust_version |
rustc 1.95.0 (59807616e 2026-04-14) |
| rust_channel |
1.95.0-x86_64-unknown-linux-gnu |
| cargo_version |
cargo 1.95.0 (f2d3ce0bd 2026-03-21) |
| build_time |
2026-07-18 03:35:58 +00:00 |
| build_rust_channel |
release |
| allocator |
standard |
| features |
default, lsp, mcp, network, plugin, rustls-tls, sqlite, static-link-openssl, trash-support |
| installed_plugins |
|
| experimental_options |
example=false, dc-glob=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=true, native-clip=false, cell-path-types=false |
Bug report form
Describe the bug
Long story short: this should not be necessary / automatic. When these variables are set as strings, as they just ARE. Nushell fails on them. Nushell expect a list of strings for commands with flags or subcommands. But in these cases It's not very intuitive
How to reproduce
Expected behavior
Nushell expect a list of strings for commands with flags or subcommands. But in these cases It's not very intuitive
Configuration
version | transpose key value | to md --pretty