-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
enhancementa request to improve CLIa request to improve CLI
Description
Describe the feature or problem you’d like to solve
I want completions for --state flag of gh pr list/gh issue list command.
Expected behavior is:
$ gh pr list --state [TAB]
all closed merged open
It prevent wrong input such as gh pr list --state opened, gh issue list --state close, etc...
(I wasted many time by these typos)
Proposed solution
We can use cobra's completion support (RegisterFlagCompletionFunc) in the same way as #3628.
I confirmed in my branch which works good on zsh.
state-flag.mov
Diff is here: 936d6e1...autopp:complete-state-flag
If this approach is okey, I'll submit it as a PR
Additional context
n/a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLI