Skip to content

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

@ian-h-chamberlain

Description

@ian-h-chamberlain

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:

reedline-insert-completions.mov

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions