Skip to content

Show default string in prompt#3328

Merged
Rowlando13 merged 3 commits into
pallets:stablefrom
kdeldycke:show-default-string-in-prompt
Apr 16, 2026
Merged

Show default string in prompt#3328
Rowlando13 merged 3 commits into
pallets: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.

@kdeldycke kdeldycke added bug f:prompt feature: prompt for input labels Apr 9, 2026
@kdeldycke kdeldycke added this to the 8.3.3 milestone Apr 9, 2026
@kdeldycke kdeldycke linked an issue Apr 9, 2026 that may be closed by this pull request
@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.

thejcannon and others added 2 commits April 13, 2026 20:28
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 06e47c7 to 39413d9 Compare April 13, 2026 18:30
@Rowlando13 Rowlando13 merged commit 76552ff into pallets:stable Apr 16, 2026
12 checks passed
@kdeldycke kdeldycke deleted the show-default-string-in-prompt branch April 16, 2026 08:29
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

4 participants