feat(completion): add shell completions for flag values

Description

Add shell completions for flag values across multiple commands to improve

  CLI usability.

  Changes:

  • Add RegisterFlagCompletionFunc for flags like --output, --sort,--order, --status, --scope, --direction, and --access-level
  • Commands updated: ci get/list, issuable list/view, iteration list, label list, mr list/view, project contributors/list/mirror/search/view, token  create/list/revoke/rotate, user events, variable export/get/list

  This enables tab completion for flag values when users have shell

  completion configured.

  • feat(completion): add shell completions for flag values

    Add RegisterFlagCompletionFunc for various commands to enable tab completion for flag values like --output, --sort, --order, --status, --scope, --direction, and --access-level.

    Commands updated: ci get/list, issuable list/view, iteration list, label list, mr list/view, project contributors/list/mirror/search/view, token create/list/revoke/rotate, user events, variable export/get/list.

Resolves #

How has this been tested?

  • Build the CLI: `go build -o glab .`
  • Load shell completion: `source <(./glab completion bash)`
  • Test tab completion:
    • `./glab mr list --output <Tab>` shows `text json`
    • `./glab ci list --status <Tab>` shows `unning pending success failedcanceled skipped created manual waiting_for_resource preparing scheduled`
    • `./glab token create --access-level <Tab>` shows `guest reporter

  developer maintainer owner`

Screenshots (if appropriate):

Edited by Oscar Tovar

Merge request reports

Loading