-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable completion after the 'help'/'version' flag
If the 'help' and/or 'version' flag are the ones added by Cobra, we know they should not be followed by anything, we therefore turn off file completion. If a program sets its own 'help' or 'version' flag, it can disable file completion following those flags by using ValidArgsFunction on the command on which those flags apply. Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
- Loading branch information
1 parent
bfa0766
commit 8502dce
Showing
3 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters