Skip to content

Commit

Permalink
fix: completion cmd usage & short description (#281)
Browse files Browse the repository at this point in the history
* fix completion cmd usage & short description

* fix resources description too
  • Loading branch information
k3llymariee authored May 14, 2024
1 parent a52d777 commit 362b23c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func Execute(version string) {
if err == nil {
completionCmd.Long = fmt.Sprintf(`Generate the autocompletion script for %[1]s for the specified shell.
See each command's help for details on how to use the generated script.`, rootCmd.Cmd().Name())
completionCmd.SetUsageTemplate(resourcecmd.SubcommandUsageTemplate())
rootCmd.Cmd().AddCommand(completionCmd)
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ func getUsageTemplate() string {
Commands:
{{rpad "setup" 29}} Create your first feature flag using a step-by-step guide
{{rpad "config" 29}} View and modify specific configuration values
{{rpad "completion" 29}} Generate the autocompletion script for the specified shell
{{rpad "completion" 29}} Enable command autocompletion within supported shells
Common resource commands:
{{rpad "flags" 29}} List, create, and modify feature flags and their targeting
{{rpad "environments" 29}} List, create, and manage environments
{{rpad "projects" 29}} List, create, and manage projects
{{rpad "members" 29}} Invite new members to an account
{{rpad "segments" 29}} List, create, modify, and delete segments
{{rpad "..." 29}} To see more resource commands, run 'ldcli resources help'
{{rpad "..." 29}} To see more resource commands, run 'ldcli resources'
Flags:
{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}
Expand Down

0 comments on commit 362b23c

Please sign in to comment.