Skip to content

/cd autocomplete: Enter behavior depends on highlighted-index position; Tab completes text but doesn't select; Escape doesn't dismiss the menu #3918

Description

@dfrysinger

Summary

The /cd autocomplete menu has inconsistent and surprising keybindings that make selecting a directory awkward.

Observed behavior

  • Enter: accepts the highlighted autocomplete option only if it is NOT the first item in the list. If it is the first item, Enter submits the typed text instead of accepting the suggestion.
  • Tab: does NOT select/submit the highlighted option. It only fills the input with the completed text (and even then, it strips the leading / so you still have to hit Enter afterward).
  • Escape: does NOT dismiss the autocomplete menu (which is what most CLIs do). It only clears the input text — and even that takes two presses.

Expected (matching typical shell / IDE conventions)

  • Enter on a highlighted item: always accept that item, regardless of position
  • Tab: cycle through suggestions OR accept-and-submit (pick one — both common)
  • Escape: first press dismisses the autocomplete menu; only if the menu is already closed does it clear input

Related

Why this matters

/cd is one of the most-typed slash commands and the keybinding mismatch makes it feel broken every single use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:input-keyboardKeyboard shortcuts, keybindings, copy/paste, clipboard, mouse, and text input

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions