-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement argparse.prog
style
#55
Comments
This is not as simple as it looks as argparse calls |
Closes #55 Add a new style for `%(prog)s` in the usage. The style is applied in argparse-generated usage and in user defined usage whether the user usage is plain text or rich markup.
This works exactly as I hoped. Thanks for implementing it. 🥳 |
After further experimenting, I think I found a bug which was introduced by this PR. Consider the following:
In the released 1.0.0 version, the output is:
In the unreleased main branch, the output is:
|
Thanks for the report. Could you please open a new issue for this? I'll take a look soon. |
Add a new style to highlight the name of the program. This might look like
This style would be applied to the
prog
parameter of theargparse.ArgumentParser()
constructor. In the example below, the prog isconnect
:This formatting should be applied whether the
usage
parameter is given, as it is in the example above, or if theusage
parameter is absent.The text was updated successfully, but these errors were encountered: