forked from ogier/pflag
-
Notifications
You must be signed in to change notification settings - Fork 366
Description
FlagSet.ParseErrorsWhitelist.UnknownFlags ignores unknown flags, but throws away them.
I want pflag just skip them and pass them to Args().
Input:
--known-flag known-flag-value --unknown-flag arg0 arg1 arg2
Current output via Args():
arg1 arg2
arg0 is treated as value for unknown-flag-value
Wanted output via Args():
--unknown-flag arg0 arg1 arg2
Background:
I want to create a utility wrapper for existing command. It accepts extra flags and change how to call the command.
It's used like this:
mygrep --my-extra-flag1 --my-extra-flag2 my-extra-flag2-value -i -e search-text file1 file2
polothy, nhatthm and linpeiba
Metadata
Metadata
Assignees
Labels
No labels