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

show_default as a string isn't used in prompts as the default shown #2836

Open
thejcannon opened this issue Jan 6, 2025 · 0 comments · May be fixed by #2837
Open

show_default as a string isn't used in prompts as the default shown #2836

thejcannon opened this issue Jan 6, 2025 · 0 comments · May be fixed by #2837

Comments

@thejcannon
Copy link

The behavior of click.Option("--name", default="default", show_default="show_default", prompt=True) is different for the help text and for the prompt.

Help: 👍

Usage: foo.py [OPTIONS]

Options:
  --name TEXT  [default: (show_default)]
  --help       Show this message and exit.

Prompt: 👎

Name [default]:

Ideally, this would also show the show_default:

Name [show_default]:

Environment:

  • Python version: 3.11.6
  • Click version: 8.1.6
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

Successfully merging a pull request may close this issue.

1 participant