Add many devices to the uftdi(4). Sources of the info are mainly Linux and
[dragonfly/port-amd64.git] / gnu / usr.bin / dialog / TESTS / radiolist
blob74027902e66f54d73b0d5280138e2eceaa687750
1 #!/bin/sh
2 DIALOG=${DIALOG=/usr/bin/dialog}
4 $DIALOG --title "RADIOLIST BOX" --clear \
5 --radiolist "Hi, this is a radiolist box. You can use this to \n\
6 present a list of choices, one of them can be turned \n\
7 on or off. If there are more items than can fit on the \n\
8 screen, the list will be scrolled. You can use the \n\
9 UP/DOWN arrow keys, the first letter of the choice as a\n\
10 hot key, or the number keys 1-9 to choose an option. \n\
11 Press SPACE to toggle an option on/off. \n\n\
12 Which of the following are fruits?" -1 -1 5 \
13 "Apple" "It's an apple." off \
14 "Dog" "No, that's not my dog." ON \
15 "Orange" "Yeah, that's juicy." off \
16 "Cat" "No, never put a dog and a cat together!" oFF \
17 "Fish" "Cats like fish." OFF \
18 "Lemon" "You know how it tastes." oFF 2> /tmp/radiolist.tmp.$$
20 retval=$?
22 choice=`cat /tmp/radiolist.tmp.$$`
23 rm -f /tmp/radiolist.tmp.$$
25 case $retval in
27 echo "'$choice' chosen.";;
29 echo "Cancel pressed.";;
30 255)
31 [ -z "$choice" ] || echo $choice ;
32 echo "ESC pressed.";;
33 esac