Skip to content

If the argument for the option -o begins with a minus, the argument is treated as another option instead of be treated as an argument #31

@eldipa

Description

@eldipa

The following works:

byexample .... -o '+foo -bar' ....

but the following doesn't

byexample .... -o '-bar' ....

In the latter, the -bar is treated as an option of byexample instead of be treated as an argument for -o

This is probably a bug/limitation in argparse. What could we do to improve this?

May be allowing a dummy option that begins with "+" to disambiguate? Like:

byexample .... -o '+dummy -bar' ....

or just

byexample .... -o '+  -bar' ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugout of sync between the code and the docs; something that should be fixed in the near futurefar in the futuresomething that it could be cool but it is too hard to implement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions