Skip to content

add an option to autofill the first completion immediately when called (à la vim) #18919

Description

@lafleurdeboum

Basics

  • I have done a basic search through the issue tracker to find similar or related issues.
  • I have made myself familiar with the available features of Nushell for the particular area this enhancement request touches.

Related problem

First let me state that I love Nushell and it made all shells greyish when I got used to that one !

But ... there's this thing that itched me for ages : when I find the completion that I want, I usually either press Enter to launch the command or Space to jump to another command argument. But in Nushell, pressing Enter just selects the completion, so I always have to double it, and pressing space doesn't end the completion session, so the menu pre-selects the first completion it finds. Sometimes I even press Space, then Enter, which inserts the first match it had found in its second round of completion. Very awkward.

I got used to vim's awesome completion ergonomy and I really wish I could have that in nu. Vim and Neovim have by default wildmode=full, which lets it insert the first completion immediately after I press Tab. I think my zsh config used to behave like that too. I really miss that feature in Nushell, and I find myself constantly pressing Enter. Enter usually is a "commit" button, one presses it when one's done. (That's a point of view on ergonomics, of course, and I understand some would disagree - which is why I'm asking for an option.)

Describe the solution you'd like

After I press Tab, the first selection would be added in the command line (not just selected in the menu). And the completion would be aborted if I pressed Escape (that would mean the command line would get back to where it was before I activated completion). There is no need to press Enter ever. And pressing space ends the completion.

Describe alternatives you've considered

Honestly, I considered getting back to zsh, but that would be painful on other aspects. Nushell is quite addictive :)

Additional context and details

I tried hard to find an issue that asks for the same, but couldn't find any. I just remember someone reported the strange behaviour on Space not ending completion session.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions