Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add examples to --help output for "list PROJECT" #16033

Merged
merged 1 commit into from
Oct 23, 2023
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
9 changes: 9 additions & 0 deletions cmd/argocd/commands/project_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,15 @@ func NewProjectRoleListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
var command = &cobra.Command{
Use: "list PROJECT",
Short: "List all the roles in a project",
Example: templates.Examples(`
# This command will list all the roles in argocd-project in a default table format.
argocd list argocd-project

# List the roles in the project in formats like json, yaml, wide, or name.
argocd list argocd-project --output json

`),

Run: func(c *cobra.Command, args []string) {
ctx := c.Context()

Expand Down
10 changes: 10 additions & 0 deletions docs/user-guide/commands/argocd_proj_role_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ List all the roles in a project
argocd proj role list PROJECT [flags]
```

### Examples

```
# This command will list all the roles in argocd-project in a default table format.
argocd list argocd-project

# List the roles in the project in formats like json, yaml, wide, or name.
argocd list argocd-project --output json
```

### Options

```
Expand Down
Loading