Skip to content

Commit c849e55

Browse files
author
bol-van
committed
ask_list default value fix
1 parent ec55c6f commit c849e55

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

common/dialog.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ ask_list()
3636
# $3 - (optional) default value
3737
local M_DEFAULT
3838
eval M_DEFAULT="\$$1"
39-
local M_ALL=$M_DEFAULT
39+
local M_DEFAULT_VAR="$M_DEFAULT"
4040
local M="" m
41-
41+
4242
[ -n "$3" ] && { find_str_in_list "$M_DEFAULT" "$2" || M_DEFAULT="$3" ;}
43-
43+
4444
n=1
4545
for m in $2; do
4646
echo $n : $m
@@ -52,6 +52,6 @@ ask_list()
5252
[ -z "$M" ] && M="$M_DEFAULT"
5353
echo selected : $M
5454
eval $1="\"$M\""
55-
56-
[ "$M" != "$M_DEFAULT" ]
55+
56+
[ "$M" != "$M_DEFAULT_VAR" ]
5757
}

0 commit comments

Comments
 (0)