[FEATURE] Selecting slash command from autocomplete should insert text, not execute immediately
Preflight Checklist
- [X] I have searched existing requests and this feature hasn't been requested yet
- [X] This is a single feature request (not multiple features)
Problem Statement
When typing a slash command like /my-c, the autocomplete dropdown appears with matching commands (e.g., /my-command). Selecting a command from this dropdown immediately executes it without giving the user a chance to append arguments.
This is problematic for any custom command that accepts arguments. For example:
- I want to run
/my-command some-argument - I type
/my-cand select/my-commandfrom the dropdown - The command executes immediately with no arguments
- I have to dismiss the output and retype the full command with arguments
This makes the autocomplete actively counterproductive for commands with arguments — it's faster to ignore the dropdown entirely and keep typing the full command manually.
Proposed Solution
When a user selects a slash command from the autocomplete dropdown, insert the command text into the input field instead of executing it immediately. This lets the user append arguments before pressing Enter to submit.
Expected behavior:
- User types
/my-c - Dropdown shows
/my-command - User selects
/my-command - Input field now contains
/my-command(with trailing space, cursor at end) - User types their arguments and presses Enter
- Command executes with arguments
This matches autocomplete behavior in terminals, IDEs, and other CLI tools — autocomplete completes text, it doesn't submit it.
Alternative Solutions
- Current workaround: Ignore autocomplete entirely and type the full command with arguments manually. Works but defeats the purpose of autocomplete.
- Commands can detect empty
$ARGUMENTSand display help text, but it adds an extra round-trip. - A configuration option to toggle between "insert" and "execute" behavior on autocomplete selection.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
Any custom slash command that accepts arguments hits this:
- I type
/depintending to run/deploy staging - I see the autocomplete dropdown and select
/deploy - The command runs immediately with no arguments — deploys to the wrong environment or errors out
- I have to retype
/deploy stagingfrom scratch
The longer the command name, the worse it gets — autocomplete should save keystrokes on long command names, but instead it prevents you from entering arguments at all.
Additional Context
This likely affects a large number of users since custom slash commands with $ARGUMENTS are a common pattern. The current behavior trains users to avoid the autocomplete dropdown, which is the opposite of its purpose.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗