#19096·nushell

Completion menus close when the typed text matches nothing (regression since #18791)

Author: maxim-uvarovCreated Sep 27, 2026Updated Sep 27, 2026
Labelsstatus:needs-triage

Bug report form

  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.

Describe the bug

Describe the bug

Since #18791, an open completion menu closes as soon as the text you type matches nothing. Backspace does not bring it back; you have to press Tab again. Before #18791, the menu stayed open with NO RECORDS FOUND and filled again as soon as the text matched.

This also breaks $env.config.completions.persistent_menus = true (#18573). That option says a menu closes only on Esc, Ctrl-C or accept, but it still closes on zero matches.

How to reproduce

  1. nu --no-config-file
  2. $env.config.completions.quick = false
  3. Type ls and press Tab. The menu opens with file names.
  4. Type zzzz, or any text that matches no file.
  5. The menu disappears.
  6. Press Backspace until the text matches again. The menu stays closed.

Repeat with $env.config.completions.persistent_menus = true. The result is the same.

Expected behavior

The menu stays open and shows NO RECORDS FOUND, then refills when the input matches again. This is what reedline does by itself, and what nushell did before #18791.

Cause

SourcedMenu::abandon_if_empty in crates/nu-cli/src/menus/sourced_menu.rs deactivates the menu on any fresh empty answer. #18791 also wrapped the default columnar and ide menus in SourcedMenu::abandoning(...) (crates/nu-cli/src/reedline_config.rs). Before that they were bare ReedlineMenu::EngineCompleter menus. So all menus are affected, not only menus with a source closure. abandon_if_empty never checks completions.persistent_menus.

Possible fix

The doc comment explains why the abandon exists: a picker source cancelled with Esc (fzf, input list) returns nothing, and an empty open menu would run the picker again on the next keystroke. That is worth keeping.

The two cases happen at different times, though:

  • A cancelled picker is the first answer after the menu opens.
  • "Typed past all matches" is an empty answer that comes later, after the menu has already shown values.

So the menu could close only when the first answer after activation is empty, and stay open on a later empty answer. That keeps the picker fix and gives back the old behavior. I haven't checked whether a Live-mode source can run a picker again on later keystrokes; if it can, this rule needs more thought.

Configuration

key value
version 0.116.0
major 0
minor 116
patch 0
branch
commit_hash 2459fdd134ea4fdbae42efd6924e2b41201cf363
build_os linux-aarch64
build_target aarch64-unknown-linux-gnu
rust_version rustc 1.96.1 (31fca3adb 2026-06-26)
rust_channel 1.96.1-aarch64-unknown-linux-gnu
cargo_version cargo 1.96.1 (356927216 2026-06-26)
build_time 2026-09-27 02:45:22 +00:00
build_rust_channel release
allocator standard
features dap, lsp, network, plugin, rustls-tls, sqlite, 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