How to get autocomplete to not show global flags for subcommand? #1184
Labels
area/v2
relates to / is being considered for v2
kind/bug
describes or fixes a bug
status/triage
maintainers still need to look into this
Milestone
my urfave/cli version is
v2.2.0
Checklist
Dependency Management
Describe the bug
I am using this wonderful library for croc. This utility has global flags and also flags for subcommands. Autocompletion works great, except that if I use a subcommand and autocomplete a flag, it shows the global flags and the flags for the subcommand, even though only the subcommand flags can be used.
To reproduce
Describe the steps or code required to reproduce the behavior:
Observed behavior
Subcommand shows global flags:
Global flags (for reference):
Expected behavior
I expected that autocompletion on subcommands only autocompletes flags that can be used on that subcommand. E.g. If you select a global flag from a subcommand flag autocompletion (e.g.
croc send --yes README.md
) it results in aflag provided but not defined
error.Additional context
Repo: https://github.com/schollz/croc
The text was updated successfully, but these errors were encountered: