Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions cmd/carapace-aws/cmd/botocore/aws.emr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,7 @@ commands:
- name: describe-cluster
description: Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.
flags:
--cli-input-json=: Read arguments from the JSON string provided.
--cli-input-yaml=: Read arguments from the YAML string provided.
--cluster-id=!: The identifier of the cluster to describe.
--generate-cli-skeleton: Prints a JSON skeleton to standard output without sending an API request.
- name: describe-notebook-execution
description: Provides details of a notebook execution.
flags:
Expand Down
1 change: 1 addition & 0 deletions cmd/carapace-aws/cmd/botocore/aws.sagemaker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2505,6 +2505,7 @@ commands:
--cli-input-yaml=: Read arguments from the YAML string provided.
--generate-cli-skeleton: Prints a JSON skeleton to standard output without sending an API request.
--image-name=!: The name of the image.
--version-number=: The version of the image.
- name: describe-inference-component
description: Returns information about an inference component.
flags:
Expand Down
19 changes: 14 additions & 5 deletions cmd/carapace-spec-botocore/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,21 @@ func parseService(name, folder string) *command.Command {

for name, waiter := range waiters {
operationName := CamelCaseToDash(waiter.Operation)
for _, command := range cmd.Commands {
if command.Name == operationName {
command.Name = CamelCaseToDash(name)
waitCmd.Commands = append(waitCmd.Commands, command)
break
for i := range cmd.Commands {
if cmd.Commands[i].Name != operationName {
continue
}
waitSub := cmd.Commands[i]
waitSub.Name = CamelCaseToDash(name)
if waitSub.Flags != nil {
flagsCopy := make(command.FlagSet, len(waitSub.Flags))
for k, v := range waitSub.Flags {
flagsCopy[k] = v
}
waitSub.Flags = flagsCopy
}
waitCmd.Commands = append(waitCmd.Commands, waitSub)
break
}
// TODO sort in carapace-spec
slices.SortFunc(waitCmd.Commands, func(a, b command.Command) int { return strings.Compare(a.Name, b.Name) })
Expand Down