nushell / nushell/reedline

Proposal: option to insert completions immediately without "submit" keypress

Open
#1,029 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
818
Forks
249
Avg merge
4d 14h
Merged PRs (30d)
30

Description

Hello! I've been reading various issues related to completion, in particular the many requests for "fish-like" completions.

I tried to identify the behaviors that I think would make the completion UX more fish-like, and what I came up with is this (see also reference videos below):

  1. Completions are inserted immediately when focused in the menu, instead of requiring confirmation
  2. Continuing to type anything else dismisses the completion menu, since the completion was already inserted

For users who are interested in more fish-like completions, I think an option to complete like this would make it feel a lot more "at home" (and for nushell, this in combination with external fish completion might seal the deal). I am not aware of any existing reedline options like what is described here (but please correct me if I'm wrong!).

Implementation

I've implemented a basic version of this already! It lives behind a flag like quick_completions or partial_completions. It only supports columnar menu for now, and I think it still needs some more testing and edge cases fixed, but I plan to address those changes if this proposal is accepted.

If this all seems reasonable, I'd like to contribute such a flag to reedline (and subsequently plumb it into nushell). However, I realize completions are a common area for people to make requests and implementation proposals (e.g. #993) so I wanted to make sure maintainers are onboard with this idea before opening a PR.

Here's a short video with my changes flipped on in the --example demo:

https://github.com/user-attachments/assets/f37d8e4b-27e2-4b37-a4a3-179e2e40074c

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the --example demo and review the existing completion behavior described in the issue. The proposed change is scoped to immediate insertion when a menu item is focused and dismissing the menu when typing continues; completion behavior should be tested beyond the current columnar-menu implementation before considering it done.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.