github / github/copilot-cli

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

Offen
#3,918 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:input-keyboard
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

## 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
- #1105 — `/cd DirName` vs `/cd DirName/` discrepancy
- #3865 — LLM-invocable `cd` tool (separate)

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, das /cd-Autovervollständigungsmenü und seine Tastaturbehandlung zu finden; reproduziere dann das Verhalten von Enter, Tab und Escape für den ersten und die nachfolgenden Vorschläge. Fertig ist es, wenn Enter konsistent ein hervorgehobenes Element übernimmt, Tab einer festgelegten Konvention folgt und Escape das Menü schließt, bevor die Eingabe geleert wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.