Skip to content

Support for trailing '--' to indicate remaining options to be captured/forwarded verbatim #17

Closed
@ewmailing

Description

@ewmailing

Some wrapper tools adopt the convention of using -- as a marker to denote that all the arguments preceding that marker are for the wrapper tool, and everything after goes verbatim to the tool being wrapped.

So for example, CMake is a wrapper to different build tools. Say for example, I am currently using CMake to drive xcodebuild.

cmake --build /path/to/my/builddir -- -arch armv7s

So the --build goes to cmake, and -arch armv7s goes to xcodebuild.

Writing my own wrapper tools, I would like to do something like that, where argparse does the normal thing which I can use for my tool.

But for the --
I would like either an (ordered) array or all the remaining arguments, or a flat string. Then I could just forward that to the tool I'm calling.

Is there something already in argparse that can do this? If not, this would be a feature request.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions