Skip to content

Show %(default) #9

@rsheftel

Description

@rsheftel

I commonly create my add arguments like this:

parser.add_argument( "-n", "--host", dest="host", type=str, help="host machine (default: %(default)s)", default="localhost", required=True, )

which will show on the CLI like this:

Options: -h, --help show this help message and exit -n, --host HOST host machine (default: localhost)

With argparse-interface it does not parse the %(default)s and shows that text. It would be great if it did parse it properly so that I can keep that default description in for the CLI, and have it look consistent with the TUI

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions