This commit is contained in:
teldra 2021-05-09 23:21:38 +02:00
parent 00c0da871c
commit 267b3d3c80
1 changed files with 3 additions and 1 deletions

View File

@ -20,8 +20,10 @@ multiplechoice() {
for i in $(seq 1 "$(( ${#input[@]} - 1 ))"); do
if [[ "${i}" == "1" ]]; then
choices="${input[$i]}"
use="${input[$i]}"
else
choices="${choices}|${input[$i]}"
use+=" ${input[$i]}"
fi
done
while input "[${choices}]: " "${input[1]}"; do
@ -33,7 +35,7 @@ multiplechoice() {
done
if [[ -z "${done}" ]]; then
echo wronginput "${output}"
echo use these: "${choices}"
echo use these: "${use}"
else
break
fi