Skip to content
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

feature: allow substituting command_path in command help and epilog text #2683

Open
Kamilcuk opened this issue Feb 29, 2024 · 0 comments
Open

Comments

@Kamilcuk
Copy link

Given:

@click.command(help="Example: %(prog)s --do-this")
def cli(): pass

Will result in:

$ ./command --help
Example: ./command --do-this
$ python -m command --help
Example: python -m command --do-this

The problem is that it is not possible to template the command from within the help text itself. There is %(prog)s for version string, but not for help or epilog. It would be nice to have them there, also %(version)s.

Thank you, click is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant