X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/cc1ae02e2ecebd5006fe481473fc1f15f92b121a..e97137242f065544a59bdc917fa428bf0a1ebbd8:/packages/termux-api/termux-dialog diff --git a/packages/termux-api/termux-dialog b/packages/termux-api/termux-dialog index 073c60e4..f827b2e0 100755 --- a/packages/termux-api/termux-dialog +++ b/packages/termux-api/termux-dialog @@ -6,17 +6,23 @@ SCRIPTNAME=$0 show_usage () { echo "usage: $SCRIPTNAME [OPTIONS]" echo " Show a text entry dialog." - echo " -i, --input-hint The input hint to show when the textarea is empty" + echo " -i, --input-hint The input hint to show when the input is empty" + echo " -m, --multiple-lines Use a textarea with multiple lines instead of a single" + echo " -p, --password Enter the input as a password" + echo " -t, --title The title to show for the input prompt" } PARAMS="" -O=`busybox getopt -q -l help -l input-hint: -- hi: "$@"` +O=`busybox getopt -q -l help -l input-hint: -l multiple-lines -l password -l title: -- hi:mpt: "$@"` if [ $? != 0 ] ; then show_usage; exit 1 ; fi eval set -- "$O" while true; do case "$1" in -h|--help) show_usage; exit 0;; -i|--input-hint) PARAMS="$PARAMS --es input_hint '$2'"; shift 2;; + -m|--multiple-lines) PARAMS="$PARAMS --ez multiple_lines true"; shift 1;; + -p|--password) PARAMS="$PARAMS --es input_type password"; shift 1;; + -t|--title) PARAMS="$PARAMS --es input_title '$2'"; shift 2;; --) shift; break;; *) echo Error; exit 1;; esac