[PR #6975] tui: autocomplete: expand directory on Tab, select on Enter #12187

Closed
opened 2026-02-16 18:17:07 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6975

State: closed
Merged: Yes


Previously, both Tab and Enter keys would immediately select the currently highlighted autocomplete option. There was no direct way to navigate into subdirectories unless the user already knew the exact filename within that directory.

Change the Tab key behavior to expand directories instead of selecting them. When the user presses Tab on a directory entry (identified by trailing slash), the input is updated to show the directory path, allowing further navigation into subdirectories. Enter key retains the original behavior of immediate selection.

This provides a more intuitive file navigation experience similar to shell tab completion, where Tab expands paths progressively and Enter confirms the final selection.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6975 **State:** closed **Merged:** Yes --- Previously, both Tab and Enter keys would immediately select the currently highlighted autocomplete option. There was no direct way to navigate into subdirectories unless the user already knew the exact filename within that directory. Change the Tab key behavior to expand directories instead of selecting them. When the user presses Tab on a directory entry (identified by trailing slash), the input is updated to show the directory path, allowing further navigation into subdirectories. Enter key retains the original behavior of immediate selection. This provides a more intuitive file navigation experience similar to shell tab completion, where Tab expands paths progressively and Enter confirms the final selection.
yindo added the pull-request label 2026-02-16 18:17:07 -05:00
yindo closed this issue 2026-02-16 18:17:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12187