xref: /freebsd/contrib/dialog/samples/yesno (revision a96ef4501919d7ac08e94e98dc34b0bdd744802b)
14c8945a0SNathan Whitehorn#!/bin/sh
2*a96ef450SBaptiste Daroussin# $Id: yesno,v 1.10 2020/11/26 00:05:52 tom Exp $
34c8945a0SNathan Whitehorn
44c8945a0SNathan Whitehorn. ./setup-vars
54c8945a0SNathan Whitehorn
64c8945a0SNathan WhitehornDIALOG_ERROR=254
74c8945a0SNathan Whitehornexport DIALOG_ERROR
84c8945a0SNathan Whitehorn
94c8945a0SNathan Whitehorn$DIALOG --title "YES/NO BOX" --clear "$@" \
104c8945a0SNathan Whitehorn        --yesno "Hi, this is a yes/no dialog box. You can use this to ask \
114c8945a0SNathan Whitehorn                 questions that have an answer of either yes or no. \
124c8945a0SNathan Whitehorn                 BTW, do you notice that long lines will be automatically \
134c8945a0SNathan Whitehorn                 wrapped around so that they can fit in the box? You can \
144c8945a0SNathan Whitehorn                 also control line breaking explicitly by inserting \
154c8945a0SNathan Whitehorn                 'backslash n' at any place you like, but in this case, \
164c8945a0SNathan Whitehorn                 auto wrap around will be disabled and you will have to \
174c8945a0SNathan Whitehorn                 control line breaking yourself." 15 61
184c8945a0SNathan Whitehorn
19*a96ef450SBaptiste Daroussinreturncode=$?
204c8945a0SNathan Whitehorn
214c8945a0SNathan Whitehorn. ./report-yesno
22