An argument like `-+` should probably be treated as an option with the key `+`. Your patch doesn't seem to handle this case, though - it will only handle arguments of the form `-`, `--`, `---`, etc.