PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/dialog/samples/checklist8

https://bitbucket.org/freebsd/freebsd-head/
Shell | 33 lines | 27 code | 3 blank | 3 comment | 0 complexity | 6336d189805feb115e99e7567e500ce4 MD5 | raw file
 1#! /bin/sh
 2# $Id: checklist8,v 1.10 2010/01/13 10:20:03 tom Exp $
 3# "checklist7" without --item-help
 4
 5. ./setup-vars
 6
 7. ./setup-tempfile
 8
 9$DIALOG --help-button \
10	--colors \
11	--backtitle "\Z1No Such\Zn Organization" \
12	--separate-output \
13	--title "CHECKLIST BOX" "$@" \
14        --checklist "Hi, this is a checklist box. You can use this to \n\
15present a list of choices which can be turned on or \n\
16off. If there are more items than can fit on the \n\
17screen, the list will be scrolled. You can use the \n\
18\Z4UP/DOWN\Zn arrow keys, the first letter of the choice as a \n\
19hot key, or the number keys 1-9 to choose an option. \n\
20Press \Zb\ZrSPACE\Zn to toggle an option on/off. \n\n\
21  Which of the following are fruits?" 20 61 5 \
22        "Apple"      "It's an \Z1apple\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                    off \
23        "Dog"        "No, that's not my dog. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                  ON  \
24        "Orange"     "Yeah, that's juicy. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                     off \
25        "Chicken"    "Normally not a pet. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                     off \
26        ""           "No such pet. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                            off \
27        "Cat"        "No, never put a dog and a cat together! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" oN  \
28        "Fish"       "Cats like \Z4fish\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                   On  \
29        "Lemon"      "You know how it \Zr\Zb\Z3tastes\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"     on  2> $tempfile
30
31retval=$?
32
33. ./report-tempfile