Skip to content

Conversation

@ianthomas23
Copy link
Member

@ianthomas23 ianthomas23 commented Jul 7, 2025

If the are too many options to display when using tab completion, display a yes/no prompt to display all or none of them:

Screenshot 2025-07-07 at 16 16 00

Too many here means > 99 (arbitrary threshold) or too many to display in the available terminal size. The terminal size can be hacked using export LINES=<number> and/or export COLUMNS=<number> to manually test this.

'y' is the only input that will cause all options to be displayed, n, Ctrl-C and Ctrl-D (ascii 3 and 4) will prevent the options being displayed.

Currently this only works if using the ServiceWorker for synchronous stdin, there is a bug in the SharedArrayBuffer implementation that sometimes causes the confirmation y/n key to be echoed to the next terminal prompt.

Closes #129.

@ianthomas23 ianthomas23 added the enhancement New feature or request label Jul 7, 2025
@ianthomas23 ianthomas23 force-pushed the tab-complete-yes-no branch 3 times, most recently from 8e23c12 to f7577c7 Compare July 22, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limit the size of tab completion options

2 participants