| Main index | Section 1 | Options |
The options
text is a message printed inside the dialog. rows and cols are the height and width, 0 for autosize and -1 for fullscreen.
The possible input got from the user interface is printed to standard error.
| | ||||||||||||||||
| If available set alternate screen mode, see terminfo(5). | ||||||||||||||||
| | ||||||||||||||||
| Ascii characters to draw lines. | ||||||||||||||||
| | ||||||||||||||||
| Title on the top side of the screen. | ||||||||||||||||
| | ||||||||||||||||
| Dialog horizontal position, 0 is the left screen side, -1 center. | ||||||||||||||||
| | ||||||||||||||||
| Dialog vertical position, 0 is the top screen side, -1 center. | ||||||||||||||||
| | ||||||||||||||||
|
Random settings.
Colors.
Delimiter and margins around the title.
Buttons always active or TAB to switch focus with input components, see
| ||||||||||||||||
| | ||||||||||||||||
| Label for the "Cancel" button. | ||||||||||||||||
| | ||||||||||||||||
| Hide the dialog at exit. | ||||||||||||||||
| | ||||||||||||||||
| Clear the screen, after the dialog exit if a dialog is built. | ||||||||||||||||
| | ||||||||||||||||
Enable highlights for text, the following sequences are considered escapes:
| ||||||||||||||||
| | ||||||||||||||||
| Try to set the number of columns for a row of text with autosizing; default 10. | ||||||||||||||||
| | ||||||||||||||||
|
Keep new line in
text
also if it constains a
"\n",
see
| ||||||||||||||||
| | ||||||||||||||||
|
String accepted by
strftime(3)
to customize the output of
| ||||||||||||||||
| | ||||||||||||||||
| Focus on the button with label on startup. | ||||||||||||||||
| | ||||||||||||||||
| Focus on the item with name, for Checklist, Menu, Radiolist and Treeview. | ||||||||||||||||
| | ||||||||||||||||
| Focus on "Cancel" or "amp;No" button on startup. | ||||||||||||||||
| | ||||||||||||||||
| Disable ESC key to quit. | ||||||||||||||||
| | ||||||||||||||||
| ESC key returns "Cancel" button value. | ||||||||||||||||
| | ||||||||||||||||
| Add a button with "Extra" label. | ||||||||||||||||
| | ||||||||||||||||
| Set label for the "Extra" button. | ||||||||||||||||
| | ||||||||||||||||
| Add a button with label. | ||||||||||||||||
| | ||||||||||||||||
| Add a button with label. | ||||||||||||||||
| | ||||||||||||||||
| Add a button with "Help" label. | ||||||||||||||||
| | ||||||||||||||||
| Set label for "Help" button. | ||||||||||||||||
| | ||||||||||||||||
|
Print the name of the focused item if the Help button is pressed also
with
| ||||||||||||||||
| | ||||||||||||||||
| Print also the selected items if the "Help" button is pressed. | ||||||||||||||||
| | ||||||||||||||||
| Open filename in a Textbox if F1 key is pressed, | ||||||||||||||||
| | ||||||||||||||||
| Dialog subtitle. | ||||||||||||||||
| | ||||||||||||||||
| Open a Msgbox with string if the F1 key is pressed. | ||||||||||||||||
| | ||||||||||||||||
| Do not exit with unknown options. | ||||||||||||||||
| | ||||||||||||||||
| Print '*' to hide passwords while typing; whitespace otherwise. | ||||||||||||||||
| | ||||||||||||||||
| Set a help string for each item of a Checklist, Form, Menu, Mixedform, Passwordform, Radiolist and Treeview to display at the bottom screen side. | ||||||||||||||||
| | ||||||||||||||||
| Specify a margin for items, available for Checklist, Menu and Radiolist. | ||||||||||||||||
| | ||||||||||||||||
| Set a string to prefix each item of a Checklist, Menu, Radiolist or Treeview. | ||||||||||||||||
| | ||||||||||||||||
| Load theme from file. | ||||||||||||||||
| | ||||||||||||||||
|
Maximum length of the input for
| ||||||||||||||||
| | ||||||||||||||||
| Do not show "Cancel" button. | ||||||||||||||||
| | ||||||||||||||||
| Do not display items desciption, for Checklist, Menu, Radiolist or Treeview. | ||||||||||||||||
| | ||||||||||||||||
| Do not draw borders and lines. | ||||||||||||||||
| | ||||||||||||||||
| Do not display items name, for Checklist, Menu and Radiolist. | ||||||||||||||||
| | ||||||||||||||||
| Do not draw "OK" button. | ||||||||||||||||
| | ||||||||||||||||
| No not draw the shadow of the dialog. | ||||||||||||||||
| | ||||||||||||||||
| Set label for "OK" button. | ||||||||||||||||
| | ||||||||||||||||
| If available set normal screen mode, see terminfo(5). | ||||||||||||||||
| | ||||||||||||||||
| Print input from user interface to the specified file descriptor. | ||||||||||||||||
| | ||||||||||||||||
| Set a sepator for the items in output, default whitespace. | ||||||||||||||||
| | ||||||||||||||||
| Screen size. This option can be used without a dialog. | ||||||||||||||||
| | ||||||||||||||||
| Print Dialog height and widget at exit. | ||||||||||||||||
| | ||||||||||||||||
| Print version. This option can be used without a dialog. | ||||||||||||||||
| | ||||||||||||||||
| Quote items in output, default only when necessary. | ||||||||||||||||
| | ||||||||||||||||
| Save the current theme. This option can be used without a dialog. | ||||||||||||||||
| | ||||||||||||||||
| Separate selected items with a new line and avoid to quote. | ||||||||||||||||
| | ||||||||||||||||
| Show a pseudo shadow for the dialog, enabled by default. | ||||||||||||||||
| | ||||||||||||||||
| Use single quote for items in output. | ||||||||||||||||
| | ||||||||||||||||
| Wait secs seconds to close the dialog. | ||||||||||||||||
| | ||||||||||||||||
| Print input from user interface to standand error, default. | ||||||||||||||||
| | ||||||||||||||||
| Print input from user interface to standard output. | ||||||||||||||||
| | ||||||||||||||||
|
enables focus switching between buttons and input components pressing TAB,
otherwise buttons are always active and ENTER key closes the dialog.
Suitable for:
| ||||||||||||||||
| | ||||||||||||||||
| Replace "\t" with a tab in text. | ||||||||||||||||
| | ||||||||||||||||
| Number of spaces to print a TAB in text. | ||||||||||||||||
| | ||||||||||||||||
| By default the text is changed before to be printed. If it contains at least a "\n" each new line and TAB is converted to a space, subsequent spaces are merged. Otherwise new line characters are preserved and a TAB becomes a space. This option disable the text modification. | ||||||||||||||||
| | ||||||||||||||||
| Set a graphical style: blackwhite, bsddialog, flat or dialog. | ||||||||||||||||
| | ||||||||||||||||
|
String accepted by
strftime(3)
to customize the output of
| ||||||||||||||||
| | ||||||||||||||||
| Dialog title. | ||||||||||||||||
| | |
| Dialog to select a date. | |
| | |
| Ar status Oc ... Checklist to select some item from a list via the SPACE key. An item has a name, desc and a default status specified by "on" or "off". The names of the selected items are printed to standard error. menurows is the graphical height of the list, 0 for autosize. | |
| | |
| Dialog to select a date. | |
| | |
| Ar xlabel Ar init Ar yfield Ar xfield Ar fieldlen Ar maxletters Oc ... Dialog to get a list of strings via forms. A form has a label at the position ylabel and xlabel, a field to get the input at the position yfield and xfield with graphical length fieldlen, maxletters is the maximum input length. The field can be customized, if fieldlen is negative the field is read only and its absolute value is the field length. If maxletters is 0 it is the absolute value of fieldlen. init is a default value. formrows is the graphical height of the list, 0 for autosize. | |
| | |
| Dialog with a bar to shows percentage, then it waits to read "XXX" from the standard input, then the first string replaces percentage and the following strings replace text until the next "XXX", the loop ends reading EOF. | |
| | |
| Dialog without buttons to display a message and to exit immediately. | |
| | |
| Dialog to get a string in input, init is the default value. | |
| | |
| Builds a menu to select an item from a list, Space key is equivalent to Enter. An item has a name and a desc. The name of the selected item is printed to standard error. menurows is the graphical height of the list, 0 for autosize. | |
| | |
| Ar xlabel Ar init Ar yfield Ar xfield Ar fieldlen Ar maxletters Ar flag Oc ... Dialog to get a list of strings via forms. A form has a label at the position ylabel and xlabel, a field to get the input with graphical length fieldlen at the position yfield and xfield, maxletters is the maximum input length, init is a default value, flag can be 0 for normal field, 1 to hide the typed characters and 2 to set the field read only. formrows is the graphical height of the list, 0 for autosize. | |
| | |
| Ar miniperc Oc ... Dialog to show a main bar to represent mainperc from 0 to 100 and some mini bar with a minilabel string and a miniperc with value from 0 and 100 or negative to print a descriptive string: -1 "Succeeded", -2 "Failed", -3 "Passed", -4 "Completed", -5 "Checked", -6 "Done", -7 "Skipped", -8 "amp;In Progress", -9 a blank line, -10 "N/A", -11 "Pending". | |
| | |
| Dialog to diplay a message without the "Cancel" button. UP, DOWN, HOME, END, PAGEUP and PAGEDOWN keys are availble to navigate the text. | |
| | |
| Dialog to get a password, init is the default value. | |
| | |
|
Ar ylabel Ar xlabel Ar init Ar yfield Ar xfield Ar fieldlen Ar maxletters
Oc ...
Dialog to get a list of passwords, equivalent to
| |
| | |
| Dialog runs until the timeout in seconds expires or a button is pressed. | |
| | |
| Ar status Oc ... Radiolist to select at most an item from a list via the SPACE key. An item has a name, desc and a default status specified by "on" or "off". The name of the selected item is printed to standard error. menurows is the graphical height of the list, 0 for autosize. | |
| | |
| Dialog to select a value between min and max, init is the default value, the keys UP, DOWN, HOME, END, PAGEUP and PAGEDOWN can change it. | |
| | |
| Opens and prints file the UP, DOWN, HOME, END, PAGEUP and PAGEDOWN keys are availble to navigate; "OK" button is renamed "EXIT". | |
| | |
| Dialog to select a time. | |
| | |
|
Ar desc Ar status Oc ...
Equivalent to Radiolist with
| |
| | |
| "Yes-No Question", "OK" and "Cancel" buttons are renamed "Yes" and "amp;No". UP, DOWN, HOME, END, PAGEUP and PAGEDOWN keys are availble to navigate the text. | |
0"OK", "Yes" or "Exit" button. |
1"Cancel" or "amp;No" button. |
2"Help" button. |
3"Extra" button. |
4Timeout. |
5ESC key. |
6Generic 1 button. |
7Generic 2 button. |
bsddialog --backtitle MESSAGE --title Msgbox --msgbox Message 0 0
Yes-No Question and theme:
bsddialog --theme blackwhite --yesno Question 10 30
Save a custom theme:
bsddialog --save-theme mytheme.txt --infobox qSaving theme...q 0 0
Load a custom theme:
bsddialog --load-theme mytheme.txt --infobox qCustom themeq 0 0
Checklist:
bsddialog --checklist Checklist 0 0 3 N1 amp;D1 off N2 D2 on N3 D3 off
Form:
bsddialog --form Form 0 0 0 L1: 0 0 X 0 4 20 25 L2: 1 0 Y 1 4 20 25
Multi-dialog:
bsddialog --normal-screen --begin-y 1 --yesno Continue? 0 0 \
--and-dialog --begin-y 10 --infobox Yes 0 0
Bikeshed:
bsddialog --bikeshed --inputbox Example 0 0
Mixedgauge:
bsddialog --sleep 3 --mixedgauge Example 10 30 60 L1 q -1q L2 30
Mixedgauge script:
perc=0 while [ $perc -le 100 ] do bsddialog --sleep 1 --title Mixedgauge \ --mixedgauge "\nExample...\n" 0 0 $perc \ "Hidden" " -9" \ "Label 1" " -4" \ "Label 2" " -4" \ "Label 3" $percperc=`expr $perc + 20` done
Gauge script:
i=1 for c in A B C D E F G H do sleep 1 echo XXX echo "$(expr $(expr $i "*" 100) "/" 8)" echo "[$i/8] Char: $c" echo XXX if [ $i -eq 8 ] then sleep 1 echo EOF fi i=`expr $i + 1` done | bsddialog --title Gauge --gauge "Starting..." 10 70
Obsolete Equivalent --and-widget --and-dialog --calendar <text> 2 <cols> --calendar <text> 0 <cols> --clear --clear-screen --defaultno --default-no --exit-label --ok-label --help-tags --help-print-name --item-help --item-bottom-desc --keep-tite --alternate-screen --no-items --no-descriptions --no-label --cancel-label --no-tags --no-names --nocancel --no-cancel --nook --no-ok --separator --output-separator --yes-label --ok-label
bsddialog provides a subset of the functionality described in the dialog manual. The following features were reimplemented:
Options:
Dialogs:
Some feature differs in input, output, or behavior. Compatibility is not a priority for future development.
| BSDDIALOG (1) | September 23, 2022 |
| Main index | Section 1 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | There are two major products of Berkeley, CA -- LSD and UNIX. We don't believe this to be strictly by coincidence. | ” |
| — Jeremy S. Anderson | ||