Don't complete --help flag when flag parsing disabled (#2061)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Fixes #2060 When a command sets `DisableFlagParsing = true` it requests the responsibility of doing all the flag parsing. Therefore even the `--help/-f/--version/-v` flags should not be automatically completed by Cobra in such a case. Without this change the `--help/-h/--version/-v` flags can end up being completed twice for plugins: one time from cobra and one time from the plugin (which has set `DisableFlagParsing = true`).
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
Diff stats
2 files+55 added−6 removed
- other:+55 added−6 removed