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

Aperta
#3,918 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:input-keyboard
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

## 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando il menu di completamento automatico /cd e la relativa gestione della tastiera, quindi riproduci il comportamento di Enter, Tab ed Escape per il primo suggerimento e per quelli successivi. Il lavoro è completato quando Enter accetta sempre un elemento evidenziato, Tab segue una convenzione scelta ed Escape chiude il menu prima di cancellare l’input.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.