KuthumiPepple commented on code in PR #3227: URL: https://github.com/apache/camel-k/pull/3227#discussion_r859979883
########## pkg/cmd/root.go: ########## @@ -237,3 +241,36 @@ func (command *RootCmdOptions) GetCamelCmdClient() (*v1.CamelV1Client, error) { func (command *RootCmdOptions) NewCmdClient() (client.Client, error) { return client.NewOutOfClusterClient(command.KubeConfig) } + +func wrappedFlagUsages(cmd *cobra.Command) string { + width := 80 + if w, _, err := term.GetSize(0); err == nil { + width = w + } + return cmd.Flags().FlagUsagesWrapped(width - 1) +} + +var usageTemplate = `Usage:{{if .Runnable}} + {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}} + {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}} + +Aliases: Review Comment: Will do ########## pkg/cmd/root.go: ########## @@ -237,3 +241,36 @@ func (command *RootCmdOptions) GetCamelCmdClient() (*v1.CamelV1Client, error) { func (command *RootCmdOptions) NewCmdClient() (client.Client, error) { return client.NewOutOfClusterClient(command.KubeConfig) } + +func wrappedFlagUsages(cmd *cobra.Command) string { + width := 80 + if w, _, err := term.GetSize(0); err == nil { + width = w + } + return cmd.Flags().FlagUsagesWrapped(width - 1) +} + +var usageTemplate = `Usage:{{if .Runnable}} + {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}} + {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}} + +Aliases: + {{.NameAndAliases}}{{end}}{{if .HasExample}} + +Examples: Review Comment: Will do -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org