Update displayDialogBox()

This commit is contained in:
Santiago Lo Coco 2022-02-16 12:15:45 -03:00
parent ac3d75f81e
commit 5b674bcaf7
1 changed files with 3 additions and 9 deletions

View File

@ -3,21 +3,15 @@
displayDialogBox() { displayDialogBox() {
case $dialogBox in case $dialogBox in
whiptail) whiptail)
if [ "$1" = "--menu" ]; then if [[ "$1" == "--checklist" || "$1" == "--menu" ]]; then
useWhiptailListOrMenu "$@"
elif [ "$1" = "--checklist" ]; then
useWhiptailListOrMenu "$@" useWhiptailListOrMenu "$@"
else else
if [ "$1" = "--infobox" ] && tty | grep -q "/dev/pts"; then [ "$1" = "--infobox" ] && tty | grep -q "/dev/pts" && local TERM=ansi
local TERM=ansi
fi
useWhiptail "$@" useWhiptail "$@"
fi fi
;; ;;
dialog) dialog)
if [ "$1" = "--menu" ]; then if [[ "$1" == "--checklist" || "$1" == "--menu" ]]; then
useDialogListOrMenu "$@"
elif [ "$1" = "--checklist" ]; then
useDialogListOrMenu "$@" useDialogListOrMenu "$@"
else else
useDialog "$@" useDialog "$@"