Often you need sub commands, starting with options without any dashes.
Examples:
git --git-dir=some/path.git log --oneline
npm -g config ls -l
This should be parsed recursively, with a new option type for sub commands.
When a sub command option is parsed, it's handler calls the parser loop again to extract as much of it's own options as possible, then returns to the outer parser.