diff --git a/scripts/common.sh b/scripts/common.sh index 8f9eae6..3218047 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -92,12 +92,13 @@ useWhiptail() { } usePlainText() { - inputbox=false; infobox=false; yesno=false + inputbox=false; infobox=false; passwordbox=false; yesno=false for item in "$@"; do case $item in --title) shift && shift ;; --inputbox) inputbox=true ;; --infobox) infobox=true ;; + --passwordbox) passwordbox=true ;; --yesno) yesno=true ;; esac done @@ -105,6 +106,9 @@ usePlainText() { if [ $inputbox = true ]; then read -r readVar printf "$readVar" 1>&2 + elif [ $passwordbox = true ]; then + read -r -s readVar + printf "$readVar" 1>&2 elif [ $yesno = true ]; then printf "[y/n] " read -n 1 -r readVar