Skip to content

fix(list): show help when no subcommand is provided#123

Merged
netr0m merged 1 commit into
netr0m:mainfrom
abicky:show-help
Jun 5, 2026
Merged

fix(list): show help when no subcommand is provided#123
netr0m merged 1 commit into
netr0m:mainfrom
abicky:show-help

Conversation

@abicky

@abicky abicky commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

Running az-pim-cli list without a subcommand currently produces no output, which can be confusing for users because it is not obvious that a subcommand is required.

This PR changes the behavior to display the command help when no subcommand is specified, making the command more user-friendly and improving discoverability of the available subcommands.

Before:

$ go run . list

After:

$ go run . list
Query Azure PIM for eligible role assignments

Usage:
  az-pim-cli list [flags]
  az-pim-cli list [command]

Aliases:
  list, l, ls

Available Commands:
  group       Query Azure PIM for eligible group assignments
  resource    Query Azure PIM for eligible resource assignments (azure resources)
  role        Query Azure PIM for eligible Entra role assignments

Flags:
  -h, --help   help for list

Global Flags:
      --cloud string    Which Azure environment to use ('global', 'usgov', 'china') (default "global")
  -c, --config string   config file (default is $HOME/.az-pim-cli.yaml)
      --debug           Enable debug logging

Use "az-pim-cli list [command] --help" for more information about a command.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contribution guidelines
  • My changes follow the Styleguide of this project
  • I have run the pre-commit hooks included in this repository
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • All GitHub Actions workflows for this branch/PR have run successfully

@abicky abicky requested a review from netr0m as a code owner May 29, 2026 15:30
@netr0m

netr0m commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Thanks for your contribution, @abicky! Approved - will include as part of the next release.

@netr0m netr0m merged commit cf93f0e into netr0m:main Jun 5, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants