Repository navigation
make $env.config show default configuration when not set even with nu -n - #18747
Merged
Merged
Conversation
|
Hey, just a bot checking in! You edited files related to the configuration. |
Bahex
pushed a commit
that referenced
this pull request
Jul 31, 2026
## Description This PR fixes and oversight in #18747 where color config fallbacks were set to the Color::Default. ## User-facing changes (Release notes) If you set part of the color config, the defaults for the other parts will still be applied.
kronberger-droid
added a commit
to kronberger-droid/nushell
that referenced
this pull request
Aug 13, 2026
Both entries claimed a full list replacement (`=`) clears the defaults. It has not since nushell#18747 made them `Config::default()` values merged by name, so `$env.config.keybindings = []` and `$env.config.menus = []` are both no-ops. Dropped those two commented examples rather than document an operation that does nothing.
fdncred
pushed a commit
that referenced
this pull request
Aug 13, 2026
## Description #18761 swapped the wholesale `self.keybindings = keybindings` assignment for a loop that merges each incoming binding into the existing list, matching on `name`. `name` is `Option<Value>` on `ParsedKeybinding`, so an unnamed binding matches nothing and falls through to the `push`, every time. Re-sourcing a config therefore grows the list by one entry per unnamed binding on each pass. The fix matches on the identity reedline already keys a binding by: named bindings compare on the expanded `name`, unnamed ones on `modifier`, `keycode` and `mode`, and a named/unnamed pair never matches. Also fixes `doc_config.nu`, which still claimed a full list replacement (`=`) clears the defaults for `keybindings` and `menus`. That was true when #18747 wrote it, but #18761 made both assignments no-ops without updating the text, so I dropped the two commented examples. Worth landing before 0.115, since neither PR has shipped yet (last tag is 0.114.1). ## User-facing changes (Release notes) Assigning `$env.config.keybindings` or `$env.config.menus` now merges into the defaults rather than replacing them, so `$env.config.keybindings = []` and `$env.config.menus = []` no longer clear anything. Set `event: null` on a matching binding to unbind a key. ## Additional notes The merge change rode in on #18761 alongside a large amount of unrelated completer work, which is probably why the doc drift went unnoticed. Out of scope: the merge still has no way to drop a binding outright.
kronberger-droid
added a commit
to kronberger-droid/nushell
that referenced
this pull request
Nov 3, 2026
Since nushell#18761 assigning `$env.config.keybindings` merged into the current list, thus no assignment could drop a single binding, and a binding with a bad keycode errored on every prompt until the whole list was cleared. The list is now stored as written, like any other list: `=` replaces it, `++=` appends and a filtered list drops what it filtered out. Reedline applies the entries in order on top of its base maps, so the last entry on a key wins, in each mode it names. A name is only a label. `= [mine]` now drops the default menu bindings as well, since nushell#18747 moved them into the list. Use `++=` to keep them. `SharedKeybindingName` goes: one name on several keys (atuin) is no longer ambiguous once nothing merges by name.
kronberger-droid
added a commit
to kronberger-droid/nushell
that referenced
this pull request
Nov 3, 2026
Since nushell#18761 assigning `$env.config.keybindings` merged into the current list, thus no assignment could drop a single binding, and a binding with a bad keycode errored on every prompt until the whole list was cleared. The list is now stored as written, like any other list: `=` replaces it, `++=` appends and a filtered list drops what it filtered out. Reedline applies the entries in order on top of its base maps, so the last entry on a key wins, in each mode it names. A name is only a label. `= [mine]` now drops the default menu bindings as well, since nushell#18747 moved them into the list. Use `++=` to keep them. `SharedKeybindingName` goes: one name on several keys (atuin) is no longer ambiguous once nothing merges by name.
kronberger-droid
added a commit
to kronberger-droid/nushell
that referenced
this pull request
Nov 3, 2026
Since nushell#18761 assigning `$env.config.keybindings` merged into the current list, thus no assignment could drop a single binding, and a binding with a bad keycode errored on every prompt until the whole list was cleared. The list is now stored as written, like any other list: `=` replaces it, `++=` appends and a filtered list drops what it filtered out. Reedline applies the entries in order on top of its base maps, so the last entry on a key wins, in each mode it names. A name is only a label. `= [mine]` now drops the default menu bindings as well, since nushell#18747 moved them into the list. Use `++=` to keep them. `SharedKeybindingName` goes: one name on several keys (atuin) is no longer ambiguous once nothing merges by name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR has been a long time coming. It finally shows most of the default config settings when you inspect them with
$env.confgeven if you haven't sourced any config.nu files.User-facing changes (Release notes)
Now it's easier to see what the default settings are when you don't have them configured. Show (nearly) all settings in
$env.config. If you haven't set any, or launched withnu -n, it will show defaults.Additional notes
For posterity, here are the things I found that are not contained in the $env.config.