summaryrefslogtreecommitdiffstats
path: root/config_query_multi.function
diff options
context:
space:
mode:
authorJaka Kranjc2008-11-27 22:13:12 +0100
committerJaka Kranjc2008-11-27 22:13:12 +0100
commit87957f241f95b029983b5191dee7fccd7885f385 (patch)
treed193975be0748d5a9b5a7ec67dcca48d56439453 /config_query_multi.function
parent7096fb938b4c3493162e63ae6887fe50867f71c4 (diff)
config_query_multi.function: fixed two issues, patch by Fredrik
Carlström #14914 someone please apply this to binary too; other grimoires don't use it
Diffstat (limited to 'config_query_multi.function')
-rwxr-xr-xconfig_query_multi.function4
1 files changed, 3 insertions, 1 deletions
diff --git a/config_query_multi.function b/config_query_multi.function
index 56afd52577..ca9d27f1b0 100755
--- a/config_query_multi.function
+++ b/config_query_multi.function
@@ -49,6 +49,7 @@ function select_list_sub_multi() {
local default=$4
local __result=() j
+ local answer answer_parsed
while [[ ! $__result ]] ; do
message -n "$msgstr"
@@ -101,6 +102,7 @@ function real_config_query_multi () {
echo -e "[[ ${QUERY_COLOR}${QUESTION}${DEFAULT_COLOR} -> '${QUERY_COLOR}$ANSWER${DEFAULT_COLOR}' ]]"
else
# if there was an answer before, find it
+ local stuff=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
local defaults default default_num foo
config_get_last_option "$VARIABLE" default
[[ $default ]] || default="$1"
@@ -108,7 +110,7 @@ function real_config_query_multi () {
let i=0
for foo in "$@"; do
if [[ "$defaults" == "$foo" ]] ; then
- default_num="$default_num $i"
+ default_num="$default_num ${stuff[$i]}"
fi
let i++
done