From c849e55ef0f1c244206f5a05ff7b1ab41a3824ee Mon Sep 17 00:00:00 2001 From: bol-van Date: Fri, 16 Jan 2026 14:18:06 +0300 Subject: [PATCH] ask_list default value fix --- common/dialog.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/dialog.sh b/common/dialog.sh index 44f78c41..ec1c9aa2 100644 --- a/common/dialog.sh +++ b/common/dialog.sh @@ -36,11 +36,11 @@ ask_list() # $3 - (optional) default value local M_DEFAULT eval M_DEFAULT="\$$1" - local M_ALL=$M_DEFAULT + local M_DEFAULT_VAR="$M_DEFAULT" local M="" m - + [ -n "$3" ] && { find_str_in_list "$M_DEFAULT" "$2" || M_DEFAULT="$3" ;} - + n=1 for m in $2; do echo $n : $m @@ -52,6 +52,6 @@ ask_list() [ -z "$M" ] && M="$M_DEFAULT" echo selected : $M eval $1="\"$M\"" - - [ "$M" != "$M_DEFAULT" ] + + [ "$M" != "$M_DEFAULT_VAR" ] }