diff options
Diffstat (limited to 'contrib/dialog/samples/report-string')
-rw-r--r-- | contrib/dialog/samples/report-string | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/dialog/samples/report-string b/contrib/dialog/samples/report-string new file mode 100644 index 0000000..dc96c2f --- /dev/null +++ b/contrib/dialog/samples/report-string @@ -0,0 +1,24 @@ +#!/bin/sh +# $Id: report-string,v 1.3 2012/06/29 09:32:17 tom Exp $ +# Report result passed in a string $RESULT +# vile:shmode + +case $retval in + $DIALOG_OK) + echo "Result is $RESULT";; + $DIALOG_CANCEL) + echo "Cancel pressed.";; + $DIALOG_HELP) + echo "Help pressed ($RESULT).";; + $DIALOG_EXTRA) + echo "Extra button pressed.";; + $DIALOG_ITEM_HELP) + echo "Item-help button pressed.";; + $DIALOG_ESC) + if test -n "$RESULT" ; then + echo "$RESULT" + else + echo "ESC pressed." + fi + ;; +esac |