feat(cli): Add additional examples to proj list command (#25169)

Signed-off-by: Omar Nasser <omarnasserjr@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
This commit is contained in:
Omar Nasser
2025-11-27 23:10:36 +02:00
committed by GitHub
parent 3d73f69522
commit 46783614d5
2 changed files with 5 additions and 4 deletions

View File

@@ -41,8 +41,9 @@ type policyOpts struct {
// NewProjectCommand returns a new instance of an `argocd proj` command
func NewProjectCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
command := &cobra.Command{
Use: "proj",
Short: "Manage projects",
Use: "proj",
Short: "Manage projects",
Aliases: []string{"project"},
Example: templates.Examples(`
# List all available projects
argocd proj list
@@ -826,7 +827,7 @@ func NewProjectListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comman
# List all available projects
argocd proj list
# List all available projects in yaml format
# List all available projects in yaml format (other options are "json" and "name")
argocd proj list -o yaml
`),
Run: func(c *cobra.Command, _ []string) {

View File

@@ -14,7 +14,7 @@ argocd proj list [flags]
# List all available projects
argocd proj list
# List all available projects in yaml format
# List all available projects in yaml format (other options are "json" and "name")
argocd proj list -o yaml
```