More scripting:

This commit is contained in:
2026-04-14 11:14:40 -07:00
parent bc86aafd61
commit 0d01c3bf7c
6 changed files with 144 additions and 20 deletions
+4 -2
View File
@@ -52,9 +52,11 @@ prompt_yes_default() {
esac
}
# Prompt for a value with a default
# Prompt for a value with a default.
# The prompt goes to stderr so callers can capture ONLY the chosen value
# via command substitution: VAL=$(prompt_value "Label" "default").
prompt_value() {
printf "${CYAN}%s [%s]:${NC} " "$1" "$2"
printf "${CYAN}%s [%s]:${NC} " "$1" "$2" >&2
read -r _response
if [ -z "$_response" ]; then
echo "$2"