-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityon-release-notesIssue/pull request mentioned in release notesIssue/pull request mentioned in release noteson-testplanterminal-suggest
Milestone
Description
Currently our fig spec integration is quite simple, basically we just pull top-level options, arguments and subcommands here:
vscode/extensions/terminal-suggest/src/terminalSuggestMain.ts
Lines 331 to 353 in cea8ab5
| const argsCompletionResult = handleArguments(specLabel, spec, terminalContext, precedingText); | |
| if (argsCompletionResult) { | |
| items.push(...argsCompletionResult.items); | |
| filesRequested ||= argsCompletionResult.filesRequested; | |
| foldersRequested ||= argsCompletionResult.foldersRequested; | |
| } | |
| if (!argsCompletionResult?.items.length) { | |
| // Arg completions are more specific, only get options if those are not provided. | |
| const optionsCompletionResult = handleOptions(specLabel, spec, terminalContext, precedingText, prefix); | |
| if (optionsCompletionResult) { | |
| items.push(...optionsCompletionResult.items); | |
| filesRequested ||= optionsCompletionResult.filesRequested; | |
| foldersRequested ||= optionsCompletionResult.foldersRequested; | |
| } | |
| } | |
| const subcommands = handleSubcommands(specLabel, spec, terminalContext, precedingText, prefix); | |
| if (subcommands) { | |
| items.push(...subcommands.items); | |
| filesRequested ||= subcommands.filesRequested; | |
| foldersRequested ||= subcommands.foldersRequested; | |
| } |
We want to better support this in a way that we can leverage all the functionality it brings. Such as:
- When you're in a subcommand, only present that subcommands options Terminal: Add basic subcommand support for fig specs #239518
- If an option is already specified, don't allow it to be used again
--typically prevent all options after it- Complex options with multiple arguments should work
- etc.
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityon-release-notesIssue/pull request mentioned in release notesIssue/pull request mentioned in release noteson-testplanterminal-suggest