Delegate help and completion to extensions when applicable#1137
Open
jeri-temporal wants to merge 2 commits into
Open
Delegate help and completion to extensions when applicable#1137jeri-temporal wants to merge 2 commits into
jeri-temporal wants to merge 2 commits into
Conversation
Shell completion always sets __complete as the first argument, so to delegate to extensions, `temporal __complete cloud n` needs to be rewritten as `temporal-cloud __complete n`. `help` can be invoked the same way
jeri-temporal
commented
Jul 23, 2026
| // the current command's path in the hierarchy. | ||
| // so they appear in shell completion and the default help output. It filters extensions | ||
| // based on the current command's path in the hierarchy. | ||
| func registerExtensionCommands(cmd *cobra.Command) { |
Contributor
Author
There was a problem hiding this comment.
Now that this is used for shell completion as well, it feels like it probably belongs in commands.extension.go, but I didn't want to move it at the same time as making modifications to its behavior. If you agree, I'm happy to move it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shell completion always sets __complete as the first argument, so to
delegate to extensions,
temporal __complete cloud nneeds to berewritten as
temporal-cloud __complete n.helpcan be invoked thesame way
Related issues
CLDDX-150
What changed?
tryExecuteExtensiondelegateshelpand shell completion to extensions that match the remaining argumentsChecklist
Design
Tests
func TestXxx) where applicableManual tests
Setup
Install at least one extension, like the cloud cli (
brew install temporalio/prerelease/temporal-cloudon Mac or Linux with homebrew installed)Happy path
Error case
(no completions shown)
Behavior remains unchanged when an unknown argument is passed to
temporal help: