aboutsummaryrefslogtreecommitdiff
path: root/samples/inputmenu2
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-02-26 09:05:35 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-02-26 09:05:35 +0000
commit01b7bcd408fd9e9dc9088b1df5761fcc0971d7e1 (patch)
tree593f2e62b1846058a020ffcecb0ef93eb7ac2153 /samples/inputmenu2
parent4dccdce4191d6e2bc3ba9f782b0fe1aa46b743e3 (diff)
Diffstat (limited to 'samples/inputmenu2')
-rwxr-xr-xsamples/inputmenu212
1 files changed, 6 insertions, 6 deletions
diff --git a/samples/inputmenu2 b/samples/inputmenu2
index ecef6742cbaa..1cb519d1c6c3 100755
--- a/samples/inputmenu2
+++ b/samples/inputmenu2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu2,v 1.9 2012/07/01 01:00:34 tom Exp $
+# $Id: inputmenu2,v 1.12 2020/11/26 00:29:26 tom Exp $
#
# "inputmenu1" with defaultitem, help-button.
@@ -19,7 +19,7 @@ defaultitem="Username:"
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --clear --ok-label "Create" \
+returntext=`$DIALOG --clear --ok-label "Create" \
--backtitle "$backtitle" \
--help-button \
--help-label "Script" \
@@ -65,8 +65,8 @@ exec 3>&-
$user" 10 40
;;
$DIALOG_EXTRA)
- tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ tag=`echo "$returntext" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
+ item=`echo "$returntext" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username:)
@@ -88,8 +88,8 @@ exec 3>&-
test -n "$tag" && defaultitem="$tag"
;;
- $DIALOG_ESC)
- echo "ESC pressed."
+ *)
+ . ./report-button
break
;;