diff --git a/client/v2/autocli/msg.go b/client/v2/autocli/msg.go index 0b3143620fd0..797c4c417348 100644 --- a/client/v2/autocli/msg.go +++ b/client/v2/autocli/msg.go @@ -47,8 +47,8 @@ func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autoc for cmdName, subCmdDescriptor := range cmdDescriptor.SubCommands { subCmd := findSubCommand(cmd, cmdName) if subCmd == nil { - short := cmdDescriptor.Short - if cmdDescriptor.Short == "" { + short := subCmdDescriptor.Short + if short == "" { short = fmt.Sprintf("Tx commands for the %s service", subCmdDescriptor.Service) } subCmd = topLevelCmd(cmd.Context(), cmdName, short) diff --git a/client/v2/autocli/query.go b/client/v2/autocli/query.go index d9f01cd70d76..ace56f459c90 100644 --- a/client/v2/autocli/query.go +++ b/client/v2/autocli/query.go @@ -41,7 +41,7 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut for cmdName, subCmdDesc := range cmdDescriptor.SubCommands { subCmd := findSubCommand(cmd, cmdName) if subCmd == nil { - short := cmdDescriptor.Short + short := subCmdDesc.Short if short == "" { short = fmt.Sprintf("Querying commands for the %s service", subCmdDesc.Service) }