merge: reconcile logging regressions with local validation
This commit is contained in:
+4
-3
@@ -68,7 +68,8 @@ header() {
|
||||
local title="$1"
|
||||
local len="${#title}"
|
||||
local line
|
||||
line=$(printf '%*s' "$((len + 4))" | tr ' ' '═')
|
||||
line=$(printf '%*s' "$((len + 4))" '')
|
||||
line="${line// /═}"
|
||||
echo ""
|
||||
echo -e "${CYAN}╔${line}╗${NC}"
|
||||
echo -e "${CYAN}║ ${title} ║${NC}"
|
||||
@@ -107,7 +108,7 @@ prompt_default() {
|
||||
local prompt_text="$2"
|
||||
local default="$3"
|
||||
local value
|
||||
read -p "${CYAN}${prompt_text}${NC} (default '${default}'): " value
|
||||
read -r -p "${CYAN}${prompt_text}${NC} (default '${default}'): " value
|
||||
value="${value:=$default}"
|
||||
eval "$var_name=\"$value\""
|
||||
}
|
||||
@@ -115,6 +116,6 @@ prompt_default() {
|
||||
confirm() {
|
||||
local prompt="$1"
|
||||
local response
|
||||
read -p "${prompt} (y/N): " response
|
||||
read -r -p "${prompt} (y/N): " response
|
||||
[[ "$response" =~ ^[Yy]$ ]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user