For me, the use case seems too DWIM. I could be wrong and just can't think of an ideal case but it seems like you're trying to overload an argument list to be a trigger as well. It might be better served by either a default noop trigger arg like -flag 0 or -flag . or just having a new boolean flag, like -runnit, to do what you want -flag without arguments to do. You also have the option of processing your own argument list after (or even before but after is much more sane) Getopt is done if its options don't cover exactly what you want.