Skip to content

Show default string in prompt#3328

Open
kdeldycke wants to merge 2 commits intopallets:stablefrom
kdeldycke:show-default-string-in-prompt
Open

Show default string in prompt#3328
kdeldycke wants to merge 2 commits intopallets:stablefrom
kdeldycke:show-default-string-in-prompt

Conversation

@kdeldycke
Copy link
Copy Markdown
Collaborator

@kdeldycke kdeldycke commented Apr 9, 2026

This PR build-up on #2837 (original contributor deleted its fork) and #3165 (revival based on AI slop) to use the value of show_default in prompt if the latter is a string. Which aligns the display with the help screen.

Also adds a lot of unit tests for edge-cases for default prompt displaying.

This closes #2836.

When `show_default` is set to a string on an option with `prompt=True`,
use that string in the prompt instead of the actual default value,
matching the behavior of the help text.

Squashed from pallets#2837 by Josh Cannon (@thejcannon).
@kdeldycke kdeldycke force-pushed the show-default-string-in-prompt branch from ea636eb to 06e47c7 Compare April 9, 2026 09:48
@kdeldycke
Copy link
Copy Markdown
Collaborator Author

This PR is ready to be merge in stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug f:prompt feature: prompt for input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants