1DIALOG(1)                   General Commands Manual                  DIALOG(1)
2
3
4

NAME

6       dialog - display dialog boxes from shell scripts
7

SYNOPSIS

9       dialog --clear
10       dialog --create-rc file
11       dialog --print-maxsize
12       dialog common-options box-options
13

DESCRIPTION

15       Dialog is a program that will let you present a variety of questions or
16       display messages using dialog boxes from a shell script.   These  types
17       of  dialog  boxes  are implemented (though not all are necessarily com‐
18       piled into dialog):
19
20              buildlist, calendar, checklist, dselect, editbox, form, fselect,
21              gauge, infobox, inputbox, inputmenu, menu, mixedform,
22              mixedgauge, msgbox (message), passwordbox, passwordform, pause,
23              prgbox, programbox, progressbox, radiolist, rangebox, tailbox,
24              tailboxbg, textbox, timebox, treeview, and yesno (yes/no).
25
26       You can put more than one dialog box into a script:
27
28       ·   Use the "--and-widget" token to force dialog to proceed to the next
29           dialog unless you have pressed ESC to cancel, or
30
31       ·   Simply add the tokens for the next dialog box, making a chain.  Di‐
32           alog stops chaining when the return code from a dialog is  nonzero,
33           e.g., Cancel or No (see DIAGNOSTICS).
34
35       Some  widgets,  e.g.,  checklist,  will  write text to dialog's output.
36       Normally that is the standard error, but there are options for changing
37       this:  "--output-fd", "--stderr" and "--stdout".  No text is written if
38       the Cancel button (or ESC) is pressed; dialog exits immediately in that
39       case.
40

OPTIONS

42       All  options  begin  with  "--"  (two ASCII hyphens, for the benefit of
43       those using systems with deranged locale support).
44
45       A "--" by itself is used as an escape, i.e., the next token on the com‐
46       mand-line is not treated as an option.
47              dialog --title -- --Not an option
48
49       The "--args" option tells dialog to list the command-line parameters to
50       the standard error.  This is useful when debugging complex scripts  us‐
51       ing  the  "--" and "--file", since the command-line may be rewritten as
52       these are expanded.
53
54       The "--file" option tells dialog to read parameters from the file named
55       as its value.
56              dialog --file parameterfile
57
58       Blanks not within double-quotes are discarded (use backslashes to quote
59       single characters).  The result is inserted into the command-line,  re‐
60       placing  "--file" and its option value.  Interpretation of the command-
61       line resumes from that point.  If parameterfile begins with "&", dialog
62       interprets the following text as a file descriptor number rather than a
63       filename.
64
65       Most widgets accept height and width parameters, which can be  used  to
66       automatically  size the widget to accommodate multi-line message prompt
67       values:
68
69       ·   If the parameter is negative, dialog uses the screen's size.
70
71       ·   If the parameter is zero, dialog uses minimum size for  the  widget
72           to display the prompt and data.
73
74       ·   Otherwise, dialog uses the given size for the widget.
75
76   Common Options
77       Most of the common options are reset before processing each widget.
78
79       --ascii-lines
80              Rather than draw graphics lines around boxes, draw ASCII "+" and
81              "-" in the same place.  See also "--no-lines".
82
83       --aspect ratio
84              This gives you some control over the box dimensions  when  using
85              auto  sizing (specifying 0 for height and width).  It represents
86              width / height.  The default is 9, which means 9 characters wide
87              to every 1 line high.
88
89       --backtitle backtitle
90              Specifies a backtitle string to be displayed on the backdrop, at
91              the top of the screen.
92
93       --begin y x
94              Specify the position of the upper left corner of a dialog box on
95              the screen.
96
97       --cancel-label string
98              Override the label used for “Cancel” buttons.
99
100       --clear
101              Clears  the  widget  screen, keeping only the screen_color back‐
102              ground.  Use this when you combine widgets  with  "--and-widget"
103              to  erase the contents of a previous widget on the screen, so it
104              won't be seen under the contents of a following widget.   Under‐
105              stand this as the complement of "--keep-window".  To compare the
106              effects, use these:
107
108              All three widgets visible, staircase effect, ordered 1,2,3:
109
110              dialog \
111                                             --begin 2 2 --yesno "" 0 0 \
112                  --and-widget               --begin 4 4 --yesno "" 0 0 \
113                  --and-widget               --begin 6 6 --yesno "" 0 0
114
115              Only the last widget is left visible:
116
117              dialog \
118                               --clear       --begin 2 2 --yesno "" 0 0 \
119                  --and-widget --clear       --begin 4 4 --yesno "" 0 0 \
120                  --and-widget               --begin 6 6 --yesno "" 0 0
121
122              All three widgets visible, staircase effect, ordered 3,2,1:
123
124              dialog \
125                               --keep-window --begin 2 2 --yesno "" 0 0 \
126                  --and-widget --keep-window --begin 4 4 --yesno "" 0 0 \
127                  --and-widget               --begin 6 6 --yesno "" 0 0
128
129              First and third widget visible, staircase effect, ordered 3,1:
130
131              dialog \
132                               --keep-window --begin 2 2 --yesno "" 0 0 \
133                  --and-widget --clear       --begin 4 4 --yesno "" 0 0 \
134                  --and-widget               --begin 6 6 --yesno "" 0 0
135
136              Note, if you want to restore original console  colors  and  send
137              your  cursor  home  after the dialog program has exited, use the
138              clear (1) command.
139
140       --colors
141              Interpret embedded "\Z" sequences in the dialog text by the fol‐
142              lowing  character, which tells dialog to set colors or video at‐
143              tributes:
144
145              ·   0 through 7 are the  ANSI  color  numbers  used  in  curses:
146                  black, red, green, yellow, blue, magenta, cyan and white re‐
147                  spectively.
148
149              ·   Bold is set by 'b', reset by 'B'.
150
151              ·   Reverse is set by 'r', reset by 'R'.
152
153              ·   Underline is set by 'u', reset by 'U'.
154
155              ·   The settings are cumulative, e.g., "\Zb\Z1" makes  the  fol‐
156                  lowing text bold (perhaps bright) red.
157
158              ·   Restore normal settings with "\Zn".
159
160       --column-separator string
161              Tell  dialog to split data for radio/checkboxes and menus on the
162              occurrences of the given string, and to align the split data in‐
163              to columns.
164
165       --cr-wrap
166              Interpret  embedded  newlines in the dialog text as a newline on
167              the screen.  Otherwise, dialog will only wrap lines where needed
168              to fit inside the text box.
169
170              Even  though  you can control line breaks with this, Dialog will
171              still wrap any lines that are too long for the width of the box.
172              Without  cr-wrap,  the  layout  of your text may be formatted to
173              look nice in the source code of your  script  without  affecting
174              the way it will look in the dialog.
175
176              The cr-wrap feature is implemented subject to these conditions:
177
178              ·   the  string  contains  “\n” and the --no-nl-expand option is
179                  not used, or
180
181              ·   the --trim option is used.
182
183              For more information, see Whitespace Options.
184
185       --create-rc file
186              When dialog supports run-time configuration, this can be used to
187              dump a sample configuration file to the file specified by file.
188
189       --date-format format
190              If the host provides strftime, this option allows you to specify
191              the format of the date printed for the --calendar  widget.   The
192              time of day (hour, minute, second) are the current local time.
193
194       --defaultno
195              Make  the default value of the yes/no box a No.  Likewise, treat
196              the default button of widgets that provide “OK” and “Cancel”  as
197              a  Cancel.   If  "--nocancel" or "--visit-items" are given those
198              options overrides this, making the default button  always  “Yes”
199              (internally the same as “OK”).
200
201       --default-button string
202              Set the default (preselected) button in a widget.  By preselect‐
203              ing a button, a script makes it possible for the user to  simply
204              press  Enter  to  proceed through a dialog with minimum interac‐
205              tion.
206
207              The option's value is the name of the button: ok,  yes,  cancel,
208              no, help or extra.
209
210              Normally  the  first  button in each widget is the default.  The
211              first button shown is determined by the widget together with the
212              "--nook"  and "--nocancel options.  If this option is not given,
213              there is no default button assigned.
214
215       --default-item string
216              Set the default item in a checklist, form or menu box.  Normally
217              the first item in the box is the default.
218
219       --exit-label string
220              Override the label used for “EXIT” buttons.
221
222       --extra-button
223              Show an extra button, between “OK” and “Cancel” buttons.
224
225       --extra-label string
226              Override  the  label used for “Extra” buttons.  Note: for input‐
227              menu widgets, this defaults to “Rename”.
228
229       --help Prints the help message to the standard output and  exits.   The
230              help  message  is also printed if no options are given, or if an
231              unrecognized option is given.
232
233       --help-button
234              Show a help-button after “OK”  and  “Cancel”  buttons  in  boxes
235              which  have  a list of tagged items (i.e., checklist, radiolist,
236              menu, and treeview boxes).
237
238              On exit, the return status indicates that the  Help  button  was
239              pressed.   Dialog  also writes a message to its output after the
240              token “HELP”:
241
242              ·   If "--item-help" is also given, the item-help text is  writ‐
243                  ten.
244
245              ·   Otherwise, the item's tag (the first field) is written.
246
247              You   can  use  the  --help-tags  option  and/or  set  the  DIA‐
248              LOG_ITEM_HELP environment variable to modify these messages  and
249              exit-status.
250
251              This  option can be applied to other widgets, which have an “OK”
252              button, whether or not the “Cancel” button is used.  The  return
253              status  and  output are not treated specially for the other wid‐
254              gets; the help-button is just an extra button.
255
256       --help-label string
257              Override the label used for “Help” buttons.
258
259       --help-status
260              If the help-button is selected, writes the checklist,  radiolist
261              or  form  information  after  the  item-help “HELP” information.
262              This can be used to reconstruct the state of a  checklist  after
263              processing the help request.
264
265       --help-tags
266              Modify  the messages written on exit for --help-button by making
267              them always just the item's tag.  This does not affect the  exit
268              status code.
269
270       --hfile filename
271              Display the given file using a textbox when the user presses F1.
272
273       --hline string
274              Display the given string centered at the bottom of the widget.
275
276       --ignore
277              Ignore  options that dialog does not recognize.  Some well-known
278              ones such as "--icon" are ignored anyway, but this is  a  better
279              choice for compatibility with other implementations.
280
281       --input-fd fd
282              Read keyboard input from the given file descriptor.  Most dialog
283              scripts read from the standard input, but the gauge widget reads
284              a pipe (which is always standard input).  Some configurations do
285              not work properly when dialog tries to reopen the terminal.  Use
286              this  option  (with appropriate juggling of file-descriptors) if
287              your script must work in that type of environment.
288
289       --insecure
290              Makes the password widget friendlier but less secure, by echoing
291              asterisks for each character.
292
293       --iso-week
294              Set  the starting point for the week-number shown in the "--cal‐
295              endar" option according to ISO-8601, which starts numbering with
296              the first week which includes a Thursday in January.
297
298       --item-help
299              Interpret  the tags data for checklist, radiolist and menu boxes
300              adding a column which is displayed in the  bottom  line  of  the
301              screen, for the currently selected item.
302
303       --keep-tite
304              When  built with ncurses, dialog normally checks to see if it is
305              running in an xterm, and in that case tries to suppress the ini‐
306              tialization  strings  that would make it switch to the alternate
307              screen.  Switching between the normal and alternate  screens  is
308              visually  distracting  in  a  script  which  runs dialog several
309              times.  Use this option to allow dialog to use those initializa‐
310              tion strings.
311
312       --keep-window
313              Normally when dialog performs several tailboxbg widgets connect‐
314              ed by "--and-widget", it clears the old widget from  the  screen
315              by  painting over it.  Use this option to suppress that repaint‐
316              ing.
317
318              At exit, dialog repaints all of  the  widgets  which  have  been
319              marked with "--keep-window", even if they are not tailboxbg wid‐
320              gets.  That causes them to be repainted in reverse  order.   See
321              the discussion of the "--clear" option for examples.
322
323       --last-key
324              At  exit,  report  the last key which the user entered.  This is
325              the curses key code rather than a symbol or  literal  character,
326              and  is only reported for keys which are bound to an action.  It
327              can be used by scripts to distinguish between two keys which are
328              bound to the same action.
329
330       --max-input size
331              Limit  input  strings  to the given size.  If not specified, the
332              limit is 2048.
333
334       --no-cancel
335
336       --nocancel
337              Suppress the “Cancel” button in checklist, inputbox and menu box
338              modes.   A script can still test if the user pressed the ESC key
339              to cancel to quit.
340
341       --no-collapse
342              Normally dialog converts tabs to  spaces  and  reduces  multiple
343              spaces  to  a single space for text which is displayed in a mes‐
344              sage boxes, etc.  Use this option to disable that feature.  Note
345              that dialog will still wrap text, subject to the "--cr-wrap" and
346              "--trim" options.
347
348              The no-collapse feature is implemented subject to  these  condi‐
349              tions:
350
351              ·   the  string  contains  “\n” and the --no-nl-expand option is
352                  not used, or
353
354              ·   the --trim option is not used.
355
356              For more information, see Whitespace Options.
357
358       --no-items
359              Some widgets (checklist, inputmenu, radiolist, menu)  display  a
360              list with two columns (a “tag” and “item”, i.e., “description”).
361              This option tells dialog to  read  shorter  rows,  omitting  the
362              “item”  part of the list.  This is occasionally useful, e.g., if
363              the tags provide enough information.
364
365              See also --no-tags.  If both options are given, this one is  ig‐
366              nored.
367
368       --no-kill
369              Tells  dialog to put the tailboxbg box in the background, print‐
370              ing its process id to dialog's output.  SIGHUP is  disabled  for
371              the background process.
372
373       --no-label string
374              Override the label used for “No” buttons.
375
376       --no-lines
377              Rather  than  draw  lines  around boxes, draw spaces in the same
378              place.  See also "--ascii-lines".
379
380       --no-mouse
381              Do not enable the mouse.
382
383       --no-nl-expand
384              Do not convert "\n" substrings of the message/prompt  text  into
385              literal newlines.
386
387              The  no-nl-expand  feature  is  used only if the string contains
388              “\n” so that there is something to convert.
389
390              For more information, see Whitespace Options.
391
392       --no-ok
393
394       --nook Suppress the “OK” button in checklist,  inputbox  and  menu  box
395              modes.   A script can still test if the user pressed the “Enter”
396              key to accept the data.
397
398       --no-shadow
399              Suppress shadows that would be drawn to the right and bottom  of
400              each dialog box.
401
402       --no-tags
403              Some  widgets  (checklist, inputmenu, radiolist, menu) display a
404              list with two columns (a “tag” and “description”).  The  tag  is
405              useful  for scripting, but may not help the user.  The --no-tags
406              option (from Xdialog) may be used to suppress the column of tags
407              from  the  display.  Unlike the --no-items option, this does not
408              affect the data which is read from the script.
409
410              Xdialog does not  display  the  tag  column  for  the  analogous
411              buildlist and treeview widgets; dialog does the same.
412
413              Normally  dialog  allows  you  to quickly move to entries on the
414              displayed list, by matching a  single  character  to  the  first
415              character  of the tag.  When the --no-tags option is given, dia‐
416              log matches against the first character of the description.   In
417              either case, the matchable character is highlighted.
418
419       --ok-label string
420              Override the label used for “OK” buttons.
421
422       --output-fd fd
423              Direct output to the given file descriptor.  Most dialog scripts
424              write to the standard error, but  error  messages  may  also  be
425              written there, depending on your script.
426
427       --separator string
428
429       --output-separator string
430              Specify  a string that will separate the output on dialog's out‐
431              put from checklists, rather than a newline (for  --separate-out‐
432              put)  or  a  space.  This applies to other widgets such as forms
433              and editboxes which normally use a newline.
434
435       --print-maxsize
436              Print the maximum size of dialog boxes, i.e., the  screen  size,
437              to  dialog's  output.  This may be used alone, without other op‐
438              tions.
439
440       --print-size
441              Prints the size of each dialog box to dialog's output  when  the
442              box is initialized.
443
444       --print-text-only string [ height [ width ] ]
445              Prints the string as it would be wrapped in a message box to di‐
446              alog's output.
447
448              Because the optional height and width default to zero,  if  they
449              are  omitted,  dialog  autosizes  according to the screen dimen‐
450              sions.
451
452       --print-text-size string [ height [ width ] ]
453              Prints the size of the string as it would be wrapped in  a  mes‐
454              sage box, to dialog's output, as
455
456              height width
457
458              Because  the optional height and width parameters default to ze‐
459              ro, if they are  omitted,  dialog  autosizes  according  to  the
460              screen dimensions.
461
462       --print-version
463              Prints  dialog's  version  to dialog's output.  This may be used
464              alone, without other options.  It does not cause dialog to  exit
465              by itself.
466
467       --quoted
468              Normally  dialog  quotes  the strings returned by checklist's as
469              well as the item-help text.  Use this option to quote all string
470              results.
471
472       --reorder
473              By  default,  the  buildlist  widget uses the same order for the
474              output (right) list as for the input (left).  Use this option to
475              tell  dialog to use the order in which a user adds selections to
476              the output list.
477
478       --scrollbar
479              For widgets holding a scrollable set of data, draw  a  scrollbar
480              on its right-margin.  This does not respond to the mouse.
481
482       --separate-output
483              For certain widgets (buildlist, checklist, treeview), output re‐
484              sult one line at a time,  with  no  quoting.   This  facilitates
485              parsing by another program.
486
487       --separate-widget string
488              Specify  a string that will separate the output on dialog's out‐
489              put from each widget.  This is used to simplify parsing the  re‐
490              sult  of  a  dialog with several widgets.  If this option is not
491              given, the default separator string is a tab character.
492
493       --shadow
494              Draw a shadow to the right and bottom of each dialog box.
495
496       --single-quoted
497              Use single-quoting as needed (and no quotes if unneeded) for the
498              output  of  checklist's  as well as the item-help text.  If this
499              option is not set, dialog uses double quotes around  each  item.
500              In  either case, dialog adds backslashes to make the output use‐
501              ful in shell scripts.
502
503       --size-err
504              Check the resulting size of a dialog box before  trying  to  use
505              it, printing the resulting size if it is larger than the screen.
506              (This  option  is  obsolete,  since  all  new-window  calls  are
507              checked).
508
509       --sleep secs
510              Sleep (delay) for the given number of seconds after processing a
511              dialog box.
512
513       --stderr
514              Direct output to the standard error.  This is the default, since
515              curses normally writes screen updates to the standard output.
516
517       --stdout
518              Direct  output  to the standard output.  This option is provided
519              for compatibility with Xdialog, however  using  it  in  portable
520              scripts  is  not  recommended,  since curses normally writes its
521              screen updates to the standard output.  If you use this  option,
522              dialog  attempts  to  reopen the terminal so it can write to the
523              display.  Depending on the platform and your  environment,  that
524              may fail.
525
526       --tab-correct
527              Convert  each  tab  character  to  one  or  more spaces (for the
528              textbox widget; otherwise to a single space).   Otherwise,  tabs
529              are  rendered  according to the curses library's interpretation.
530              The --no-collapse option disables tab expansion.
531
532       --tab-len n
533              Specify the number of spaces that a tab  character  occupies  if
534              the  "--tab-correct"  option  is given.  The default is 8.  This
535              option is only effective for the textbox widget.
536
537       --time-format format
538              If the host provides strftime, this option allows you to specify
539              the  format  of  the time printed for the --timebox widget.  The
540              day, month, year values in this case are for the  current  local
541              time.
542
543       --timeout secs
544              Timeout  (exit  with  error code) if no user response within the
545              given number of seconds.  A timeout of zero seconds is ignored.
546
547              This option is ignored by the  "--pause"  widget.   It  is  also
548              overridden if the background "--tailboxbg" option is used to set
549              up multiple concurrent widgets.
550
551       --title title
552              Specifies a title string to be displayed at the top of the  dia‐
553              log box.
554
555       --trace filename
556              logs  the command-line parameters, keystrokes and other informa‐
557              tion to the given file.  If dialog reads a configure file, it is
558              logged as well.  Piped input to the gauge widget is logged.  Use
559              control/T to log a picture of the current dialog window.
560
561              The dialog program handles some command-line parameters special‐
562              ly,  and  removes  them from the parameter list as they are pro‐
563              cessed.  For example, if the first option is --trace, then  that
564              is  processed  (and  removed) before dialog initializes the dis‐
565              play.
566
567       --week-start day
568              sets the starting day for the week, used in the "--calendar" op‐
569              tion.  The day parameter can be
570
571              ·   a number (0 to 6, Sunday through Saturday using POSIX) or
572
573              ·   the  special  value  “locale” (this works with systems using
574                  glibc, providing an extension to  the  locale  command,  the
575                  first_weekday value).
576
577              ·   a  string  matching  one of the abbreviations for the day of
578                  the week shown in the calendar widget, e.g., “Mo” for  “Mon‐
579                  day”.
580
581       --trim eliminate  leading  blanks,  trim  literal newlines and repeated
582              blanks from message text.
583
584              The trim feature is implemented subject to these conditions:
585
586              ·   the string does not contain “\n” or
587
588              ·   the --no-nl-expand option is used.
589
590              For more information, see Whitespace Options.
591
592              See also the "--cr-wrap" and "--no-collapse" options.
593
594       --version
595              Prints dialog's version to the standard output, and exits.   See
596              also "--print-version".
597
598       --visit-items
599              Modify  the  tab-traversal  of checklist, radiolist, menubox and
600              inputmenu to include the list of items as  one  of  the  states.
601              This  is useful as a visual aid, i.e., the cursor position helps
602              some users.
603
604              When this option is given, the cursor is initially placed on the
605              list.   Abbreviations (the first letter of the tag) apply to the
606              list items.  If you tab to the button row,  abbreviations  apply
607              to the buttons.
608
609       --yes-label string
610              Override the label used for “Yes” buttons.
611
612   Box Options
613       All dialog boxes have at least three parameters:
614
615       text   the caption or contents of the box.
616
617       height the height of the dialog box.
618
619       width  the width of the dialog box.
620
621       Other parameters depend on the box type.
622
623       --buildlist text height width list-height [ tag item status ] ...
624              A  buildlist  dialog displays two lists, side-by-side.  The list
625              on the left shows unselected items.  The list on the right shows
626              selected  items.  As items are selected or unselected, they move
627              between the lists.
628
629              Use a carriage return or the “OK” button to accept  the  current
630              value  in the selected-window and exit.  The results are written
631              using the order displayed in the selected-window.
632
633              The initial on/off state of each entry is specified by status.
634
635              The dialog behaves like a menu, using the --visit-items to  con‐
636              trol whether the cursor is allowed to visit the lists directly.
637
638              ·   If --visit-items is not given, tab-traversal uses two states
639                  (OK/Cancel).
640
641              ·   If --visit-items is given, tab-traversal  uses  four  states
642                  (Left/Right/OK/Cancel).
643
644              Whether  or  not  --visit-items is given, it is possible to move
645              the highlight between the two lists using the default "^" (left-
646              column) and "$" (right-column) keys.
647
648              On  exit,  a  list  of the tag strings of those entries that are
649              turned on will be printed on dialog's output.
650
651              If the "--separate-output" option is not given, the strings will
652              be  quoted  as  needed to make it simple for scripts to separate
653              them.  By default, this uses double-quotes.  See the  "--single-
654              quoted" option, which modifies the quoting behavior.
655
656       --calendar text height width day month year
657              A  calendar  box  displays month, day and year in separately ad‐
658              justable windows.  If the values for  day,  month  or  year  are
659              missing or negative, the current date's corresponding values are
660              used.  You can increment or decrement any  of  those  using  the
661              left-, up-, right-, and down-arrows.  Use vi-style h, j, k and l
662              for moving around the array of days in  a  month.   Use  tab  or
663              backtab  to move between windows.  If the year is given as zero,
664              the current date is used as an initial value.
665
666              On exit, the date is printed in the  form  day/month/year.   The
667              format can be overridden using the --date-format option.
668
669       --checklist text height width list-height [ tag item status ] ...
670              A checklist box is similar to a menu box; there are multiple en‐
671              tries presented in the form of a menu.   Another  difference  is
672              that you can indicate which entry is currently selected, by set‐
673              ting its status to on.  Instead of choosing one entry among  the
674              entries,  each  entry  can be turned on or off by the user.  The
675              initial on/off state of each entry is specified by status.
676
677              On exit, a list of the tag strings of  those  entries  that  are
678              turned on will be printed on dialog's output.
679
680              If the "--separate-output" option is not given, the strings will
681              be quoted as needed to make it simple for  scripts  to  separate
682              them.   By default, this uses double-quotes.  See the "--single-
683              quoted" option, which modifies the quoting behavior.
684
685       --dselect filepath height width
686              The directory-selection dialog displays a text-entry  window  in
687              which  you  can  type a directory, and above that a windows with
688              directory names.
689
690              Here filepath can be a filepath in which case the directory win‐
691              dow  will  display  the  contents of the path and the text-entry
692              window will contain the preselected directory.
693
694              Use tab or arrow keys to move between the windows.   Within  the
695              directory  window, use the up/down arrow keys to scroll the cur‐
696              rent selection.  Use the space-bar to copy the current selection
697              into the text-entry window.
698
699              Typing any printable characters switches focus to the text-entry
700              window, entering that character as well as scrolling the  direc‐
701              tory window to the closest match.
702
703              Use  a  carriage return or the “OK” button to accept the current
704              value in the text-entry window and exit.
705
706              On exit, the contents of the text-entry window  are  written  to
707              dialog's output.
708
709       --editbox filepath height width
710              The  edit-box  dialog displays a copy of the file.  You may edit
711              it using the backspace, delete and cursor keys to correct typing
712              errors.   It  also recognizes pageup/pagedown.  Unlike the --in‐
713              putbox, you must tab to the “OK” or “Cancel”  buttons  to  close
714              the  dialog.  Pressing the “Enter” key within the box will split
715              the corresponding line.
716
717              On exit, the contents of the edit window are written to dialog's
718              output.
719
720       --form text height width formheight [ label y x item y x flen ilen ] ...
721              The form dialog displays a form consisting of labels and fields,
722              which are positioned on a scrollable window by coordinates given
723              in the script.  The field length flen and input-length ilen tell
724              how long the field can be.  The former defines the length  shown
725              for  a  selected field, while the latter defines the permissible
726              length of the data entered in the field.
727
728              ·   If flen is zero, the corresponding field cannot be  altered.
729                  and  the  contents  of  the  field  determine the displayed-
730                  length.
731
732              ·   If flen is negative, the corresponding field cannot  be  al‐
733                  tered,  and  the  negated  value of flen is used as the dis‐
734                  played-length.
735
736              ·   If ilen is zero, it is set to flen.
737
738              Use up/down arrows (or control/N,  control/P)  to  move  between
739              fields.  Use tab to move between windows.
740
741              On exit, the contents of the form-fields are written to dialog's
742              output, each field separated by a newline.   The  text  used  to
743              fill non-editable fields (flen is zero or negative) is not writ‐
744              ten out.
745
746       --fselect filepath height width
747              The fselect (file-selection) dialog displays a text-entry window
748              in  which you can type a filename (or directory), and above that
749              two windows with directory names and filenames.
750
751              Here filepath can be a filepath in which case the file  and  di‐
752              rectory  windows  will  display the contents of the path and the
753              text-entry window will contain the preselected filename.
754
755              Use tab or arrow keys to move between the windows.   Within  the
756              directory  or  filename  windows,  use the up/down arrow keys to
757              scroll the current selection.  Use the  space-bar  to  copy  the
758              current selection into the text-entry window.
759
760              Typing any printable characters switches focus to the text-entry
761              window, entering that character as well as scrolling the  direc‐
762              tory and filename windows to the closest match.
763
764              Typing the space character forces dialog to complete the current
765              name (up to the point where there may be a  match  against  more
766              than one entry).
767
768              Use  a  carriage return or the “OK” button to accept the current
769              value in the text-entry window and exit.
770
771              On exit, the contents of the text-entry window  are  written  to
772              dialog's output.
773
774       --gauge text height width [percent]
775              A  gauge  box displays a meter along the bottom of the box.  The
776              meter indicates the percentage.  New percentages are  read  from
777              standard  input,  one integer per line.  The meter is updated to
778              reflect each new percentage.  If the standard  input  reads  the
779              string “XXX”, then the first line following is taken as an inte‐
780              ger percentage, then subsequent lines up to  another  “XXX”  are
781              used  for  a new prompt.  The gauge exits when EOF is reached on
782              the standard input.
783
784              The percent value denotes the initial percentage  shown  in  the
785              meter.  If not specified, it is zero.
786
787              On  exit, no text is written to dialog's output.  The widget ac‐
788              cepts no input, so the exit status is always OK.
789
790       --infobox text height width
791              An info box is basically a message box.  However, in this  case,
792              dialog will exit immediately after displaying the message to the
793              user.  The screen is not cleared when dialog exits, so that  the
794              message will remain on the screen until the calling shell script
795              clears it later.  This is useful when you want to inform the us‐
796              er  that  some  operations are carrying on that may require some
797              time to finish.
798
799              On exit, no text is written to dialog's output.  An OK exit sta‐
800              tus is returned.
801
802       --inputbox text height width [init]
803              An  input  box is useful when you want to ask questions that re‐
804              quire the user to input a string as the answer.  If init is sup‐
805              plied  it is used to initialize the input string.  When entering
806              the string, the backspace, delete and cursor keys can be used to
807              correct  typing  errors.  If the input string is longer than can
808              fit in the dialog box, the input field will be scrolled.
809
810              On exit, the input string will be printed on dialog's output.
811
812       --inputmenu text height width menu-height [ tag item ] ...
813              An inputmenu box is very similar to an ordinary menu box.  There
814              are only a few differences between them:
815
816              1.  The  entries are not automatically centered but left adjust‐
817                  ed.
818
819              2.  An extra button (called Rename) is  implied  to  rename  the
820                  current item when it is pressed.
821
822              3.  It  is  possible to rename the current entry by pressing the
823                  Rename button.  Then dialog will write the following on dia‐
824                  log's output.
825
826                  RENAMED <tag> <item>
827
828       --menu text height width menu-height [ tag item ] ...
829              As  its  name  suggests,  a menu box is a dialog box that can be
830              used to present a list of choices in the form of a menu for  the
831              user to choose.  Choices are displayed in the order given.  Each
832              menu entry consists of a tag string and an item string.  The tag
833              gives  the entry a name to distinguish it from the other entries
834              in the menu.  The item is a short description of the option that
835              the  entry  represents.   The user can move between the menu en‐
836              tries by pressing the cursor keys, the first letter of  the  tag
837              as  a  hot-key, or the number keys 1 through 9.  There are menu-
838              height entries displayed in the menu at one time, but  the  menu
839              will be scrolled if there are more entries than that.
840
841              On exit the tag of the chosen menu entry will be printed on dia‐
842              log's output.  If the "--help-button" option is given, the  cor‐
843              responding  help  text  will  be printed if the user selects the
844              help button.
845
846       --mixedform text height width formheight [ label y x item y x flen ilen itype ] ...
847              The mixedform dialog displays a form consisting  of  labels  and
848              fields,  much  like  the  --form dialog.  It differs by adding a
849              field-type parameter to each field's description.  Each  bit  in
850              the type denotes an attribute of the field:
851
852              1    hidden, e.g., a password field.
853
854              2    readonly, e.g., a label.
855
856       --mixedgauge text height width percent [ tag1 item1 ] ...
857              A  mixedgauge  box displays a meter along the bottom of the box.
858              The meter indicates the percentage.
859
860              It also displays a list of the tag- and item-values at  the  top
861              of the box.  See dialog(3) for the tag values.
862
863              The  text is shown as a caption between the list and meter.  The
864              percent value denotes the initial percentage shown in the meter.
865
866              No provision is made for reading data from the standard input as
867              --gauge does.
868
869              On  exit, no text is written to dialog's output.  The widget ac‐
870              cepts no input, so the exit status is always OK.
871
872       --msgbox text height width
873              A message box is very similar to a yes/no box.  The only differ‐
874              ence  between  a  message box and a yes/no box is that a message
875              box has only a single OK button.  You can use this dialog box to
876              display  any  message  you like.  After reading the message, the
877              user can press the ENTER key so that dialog will  exit  and  the
878              calling shell script can continue its operation.
879
880              If  the message is too large for the space, dialog may allow you
881              to scroll it, provided that the underlying curses implementation
882              is  capable  enough.  In this case, a percentage is shown in the
883              base of the widget.
884
885              On exit, no text is written to dialog's output.   Only  an  “OK”
886              button  is provided for input, but an ESC exit status may be re‐
887              turned.
888
889       --pause text height width seconds
890              A pause box displays a meter along the bottom of the  box.   The
891              meter  indicates  how  many  seconds remain until the end of the
892              pause.  The pause exits when timeout  is  reached  or  the  user
893              presses the OK button (status OK) or the user presses the CANCEL
894              button or Esc key.
895
896       --passwordbox text height width [init]
897              A password box is similar to an input box, except that the  text
898              the user enters is not displayed.  This is useful when prompting
899              for passwords or other sensitive information.  Be aware that  if
900              anything is passed in “init”, it will be visible in the system's
901              process table to casual snoopers.  Also, it is very confusing to
902              the  user  to  provide  them with a default password they cannot
903              see.  For these reasons, using  “init”  is  highly  discouraged.
904              See "--insecure" if you do not care about your password.
905
906              On exit, the input string will be printed on dialog's output.
907
908       --passwordform text height width formheight [ label y x item y x flen ilen ] ...
909              This  is  identical  to  --form  except that all text fields are
910              treated as password widgets rather than inputbox widgets.
911
912       --prgbox text command height width
913
914       --prgbox command height width
915              A prgbox is very similar to a programbox.
916
917              This dialog box is used to display the output of a command  that
918              is specified as an argument to prgbox.
919
920              After the command completes, the user can press the ENTER key so
921              that dialog will exit and the calling shell script can  continue
922              its operation.
923
924              If  three  parameters  are given, it displays the text under the
925              title, delineated from the scrolling file's contents.   If  only
926              two parameters are given, this text is omitted.
927
928       --programbox text height width
929
930       --programbox height width
931              A programbox is very similar to a progressbox.  The only differ‐
932              ence between a program box and a progress box is that a  program
933              box  displays  an  OK  button  (but  only after the command com‐
934              pletes).
935
936              This dialog box is used to display the piped output  of  a  com‐
937              mand.  After the command completes, the user can press the ENTER
938              key so that dialog will exit and the calling  shell  script  can
939              continue its operation.
940
941              If  three  parameters  are given, it displays the text under the
942              title, delineated from the scrolling file's contents.   If  only
943              two parameters are given, this text is omitted.
944
945       --progressbox text height width
946
947       --progressbox height width
948              A progressbox is similar to an tailbox, except that
949
950              a) rather than displaying the contents of a file,
951                 it displays the piped output of a command and
952
953              b) it will exit when it reaches the end of the file
954                 (there is no “OK” button).
955
956              If  three  parameters  are given, it displays the text under the
957              title, delineated from the scrolling file's contents.   If  only
958              two parameters are given, this text is omitted.
959
960       --radiolist text height width list-height  [ tag item status ] ...
961              A  radiolist  box is similar to a menu box.  The only difference
962              is that you can indicate which entry is currently  selected,  by
963              setting its status to on.
964
965              On  exit,  the  tag  of the selected item is written to dialog's
966              output.
967
968       --tailbox file height width
969              Display text from a file in a dialog box, as in a "tail -f" com‐
970              mand.   Scroll  left/right using vi-style 'h' and 'l', or arrow-
971              keys.  A '0' resets the scrolling.
972
973              On exit, no text is written to dialog's output.   Only  an  “OK”
974              button  is provided for input, but an ESC exit status may be re‐
975              turned.
976
977       --rangebox text height width min-value max-value default-value
978              Allow the user to select from a range of values, e.g.,  using  a
979              slider.   The  dialog shows the current value as a bar (like the
980              gauge dialog).  Tabs or arrow keys move the cursor  between  the
981              buttons and the value.  When the cursor is on the value, you can
982              edit it by:
983
984              left/right cursor movement to select a digit to modify
985
986              +/-  characters to increment/decrement the digit by one
987
988              0 through 9
989                   to set the digit to the given value
990
991              Some keys are also recognized in all cursor positions:
992
993              home/end
994                   set the value to its maximum or minimum
995
996              pageup/pagedown
997                   increment the value so that the slider moves by one column
998
999       --tailboxbg file height width
1000              Display text from a file in a dialog box as a  background  task,
1001              as  in  a "tail -f &" command.  Scroll left/right using vi-style
1002              'h' and 'l', or arrow-keys.  A '0' resets the scrolling.
1003
1004              Dialog treats the background task specially if there  are  other
1005              widgets  (--and-widget) on the screen concurrently.  Until those
1006              widgets are closed (e.g., an “OK”), dialog will perform  all  of
1007              the  tailboxbg widgets in the same process, polling for updates.
1008              You may use a tab to traverse between the widgets on the screen,
1009              and  close them individually, e.g., by pressing ENTER.  Once the
1010              non-tailboxbg widgets are closed, dialog forks a copy of  itself
1011              into  the  background,  and  prints its process id if the "--no-
1012              kill" option is given.
1013
1014              On exit, no text is written to dialog's output.  Only an  “EXIT”
1015              button  is provided for input, but an ESC exit status may be re‐
1016              turned.
1017
1018              NOTE: Older versions of dialog forked immediately and  attempted
1019              to  update  the screen individually.  Besides being bad for per‐
1020              formance, it was unworkable.  Some older scripts  may  not  work
1021              properly with the polled scheme.
1022
1023       --textbox file height width
1024              A text box lets you display the contents of a text file in a di‐
1025              alog box.  It is like a simple text file viewer.  The  user  can
1026              move  through  the  file by using the cursor, page-up, page-down
1027              and HOME/END keys available on most keyboards.  If the lines are
1028              too  long to be displayed in the box, the LEFT/RIGHT keys can be
1029              used to scroll the text region horizontally.  You may  also  use
1030              vi-style  keys h, j, k, and l in place of the cursor keys, and B
1031              or N in place of the page-up and page-down keys.  Scroll up/down
1032              using  vi-style  'k'  and 'j', or arrow-keys.  Scroll left/right
1033              using vi-style 'h' and 'l', or arrow-keys.   A  '0'  resets  the
1034              left/right  scrolling.   For  more convenience, vi-style forward
1035              and backward searching functions are also provided.
1036
1037              On exit, no text is written to dialog's output.  Only an  “EXIT”
1038              button  is provided for input, but an ESC exit status may be re‐
1039              turned.
1040
1041       --timebox text height [width hour minute second]
1042              A dialog is displayed which allows you to  select  hour,  minute
1043              and  second.  If the values for hour, minute or second are miss‐
1044              ing or negative, the current  date's  corresponding  values  are
1045              used.   You  can  increment  or decrement any of those using the
1046              left-, up-, right- and down-arrows.  Use tab or backtab to  move
1047              between windows.
1048
1049              On  exit,  the result is printed in the form hour:minute:second.
1050              The format can be overridden using the --time-format option.
1051
1052       --treeview text height width list-height [ tag item status depth ] ...
1053              Display data organized as a tree.  Each group of data contains a
1054              tag,  the  text  to  display  for  the item, its status (“on” or
1055              “off”) and the depth of the item in the tree.
1056
1057              Only one item can be selected (like the radiolist).  The tag  is
1058              not displayed.
1059
1060              On  exit,  the  tag  of the selected item is written to dialog's
1061              output.
1062
1063       --yesno text height width
1064              A yes/no dialog box of size height rows by width columns will be
1065              displayed.  The string specified by text is displayed inside the
1066              dialog box.  If this string is too long to fit in one  line,  it
1067              will be automatically divided into multiple lines at appropriate
1068              places.  The text string can also contain the sub-string "\n" or
1069              newline  characters  `\n'  to  control line breaking explicitly.
1070              This dialog box is useful for asking questions that require  the
1071              user  to answer either yes or no.  The dialog box has a Yes but‐
1072              ton and a No button, in which the user  can  switch  between  by
1073              pressing the TAB key.
1074
1075              On  exit, no text is written to dialog's output.  In addition to
1076              the “Yes” and “No” exit codes (see DIAGNOSTICS) an ESC exit sta‐
1077              tus may be returned.
1078
1079              The  codes used for “Yes” and “No” match those used for “OK” and
1080              “Cancel”, internally no distinction is made.
1081
1082   Obsolete Options
1083       --beep This was used to tell the original cdialog that it should make a
1084              beep  when  the separate processes of the tailboxbg widget would
1085              repaint the screen.
1086
1087       --beep-after
1088              Beep after a user has completed a widget by pressing one of  the
1089              buttons.
1090
1091   Whitespace Options
1092       These options can be used to transform whitespace (space, tab, newline)
1093       as dialog reads the script:
1094              --cr-wrap, --no-collapse, --no-nl-expand, and --trim
1095
1096       The options are not independent:
1097
1098       ·   Dialog checks if the script contains at least one “\n” and  (unless
1099           --no-nl-expand is set) will ignore the --no-collapse and --trim op‐
1100           tions.
1101
1102       ·   After checking for “\n” and the --no-nl-expand option, dialog  han‐
1103           dles the --trim option.
1104
1105           If  the  --trim  option takes effect, then dialog ignores --no-col‐
1106           lapse.  It changes sequences of tabs, spaces (and  newlines  unless
1107           -cr-wrap is set) to a single space.
1108
1109       ·   If  neither the “\n” or --trim cases apply, dialog checks --no-col‐
1110           lapse to decide whether to reduce sequences of tabs and spaces to a
1111           single space.
1112
1113           In this case, dialog ignores -cr-wrap and does not modify newlines.
1114
1115       Taking those dependencies into account, here is a table summarizing the
1116       behavior for the various combinations of options.   The  table  assumes
1117       that  the script contains at least one “\n” when the --no-nl-expand op‐
1118       tion is not set.
1119
1120        cr-     no-        no-         trim    Result
1121        wrap    collapse   nl-expand
1122        ──────────────────────────────────────────────────────────────────────
1123        no      no         no          no      Convert tab to space.  Convert
1124                                               newline to space.  Convert
1125                                               “\n” to newline.
1126        no      no         no          yes     Convert tab to space.  Convert
1127                                               newline to space.  Convert
1128                                               “\n” to newline.
1129        no      no         yes         no      Convert tab to space.  Do not
1130                                               convert newline to space.
1131                                               Convert multiple-space to sin‐
1132                                               gle.  Show “\n” literally.
1133        no      no         yes         yes     Convert tab to space.  Convert
1134                                               multiple-space to single.
1135                                               Convert newline to space.
1136                                               Show “\n” literally.
1137        no      yes        no          no      Convert newline to space.
1138                                               Convert “\n” to newline.
1139        no      yes        no          yes     Convert newline to space.
1140                                               Convert “\n” to newline.
1141
1142
1143
1144        no      yes        yes         no      Do not convert newline to
1145                                               space.  Do not reduce multiple
1146                                               blanks.  Show “\n” literally.
1147        no      yes        yes         yes     Convert multiple-space to sin‐
1148                                               gle.  Convert newline to
1149                                               space.  Show “\n” literally.
1150        yes     no         no          no      Convert tab to space.  Wrap on
1151                                               newline.  Convert “\n” to new‐
1152                                               line.
1153        yes     no         no          yes     Convert tab to space.  Wrap on
1154                                               newline.  Convert “\n” to new‐
1155                                               line.
1156        yes     no         yes         no      Convert tab to space.  Do not
1157                                               convert newline to space.
1158                                               Convert multiple-space to sin‐
1159                                               gle.  Show “\n” literally.
1160        yes     no         yes         yes     Convert tab to space.  Convert
1161                                               multiple-space to single.
1162                                               Wrap on newline.  Show “\n”
1163                                               literally.
1164        yes     yes        no          no      Wrap on newline.  Convert “\n”
1165                                               to newline.
1166        yes     yes        no          yes     Wrap on newline.  Convert “\n”
1167                                               to newline.
1168        yes     yes        yes         no      Do not convert newline to
1169                                               space.  Do not reduce multiple
1170                                               blanks.  Show “\n” literally.
1171        yes     yes        yes         yes     Convert multiple-space to sin‐
1172                                               gle.  Wrap on newline.  Show
1173                                               “\n” literally.
1174

RUN-TIME CONFIGURATION

1176       1.  Create a sample configuration file by typing:
1177
1178              dialog --create-rc file
1179
1180       2.  At start, dialog determines the settings to use as follows:
1181
1182           a)  if environment variable DIALOGRC is set, its  value  determines
1183               the name of the configuration file.
1184
1185           b)  if  the  file in (a) is not found, use the file $HOME/.dialogrc
1186               as the configuration file.
1187
1188           c)  if the file in (b) is not found, try using  the  GLOBALRC  file
1189               determined at compile-time, i.e., /etc/dialogrc.
1190
1191           d)  if the file in (c) is not found, use compiled in defaults.
1192
1193       3.  Edit  the  sample configuration file and copy it to some place that
1194           dialog can find, as stated in step 2 above.
1195

KEY BINDINGS

1197       You can override or add to key bindings in dialog by adding to the con‐
1198       figuration  file.  Dialog's bindkey command maps single keys to its in‐
1199       ternal coding.
1200
1201              bindkey widget curses_key dialog_key
1202
1203       The widget name can be "*" (all widgets), or specific widgets  such  as
1204       textbox.  Specific widget bindings override the "*" bindings.  User-de‐
1205       fined bindings override the built-in bindings.
1206
1207       The curses_key can be any of the names  derived  from  curses.h,  e.g.,
1208       “HELP” from “KEY_HELP”.  Dialog also recognizes ANSI control characters
1209       such as "^A", "^?", as well as C1-controls such as "~A" and "~?".   Fi‐
1210       nally, it allows any single character to be escaped with a backslash.
1211
1212       Dialog's internal keycode names correspond to the DLG_KEYS_ENUM type in
1213       dlg_keys.h, e.g., “HELP” from “DLGK_HELP”.
1214
1215   Widget Names
1216       Some widgets (such as the formbox) have an area  where  fields  can  be
1217       edited.   Those  are managed in a subwindow of the widget, and may have
1218       separate keybindings from the main widget because  the  subwindows  are
1219       registered using a different name.
1220
1221                     Widget        Window name   Subwindow Name
1222                     ───────────────────────────────────────────
1223                     calendar      calendar
1224                     checklist     checklist
1225                     editbox       editbox       editbox2
1226                     form          formbox       formfield
1227                     fselect       fselect       fselect2
1228                     inputbox      inputbox      inputbox2
1229                     menu          menubox       menu
1230                     msgbox        msgbox
1231                     pause         pause
1232                     progressbox   progressbox
1233                     radiolist     radiolist
1234                     tailbox       tailbox
1235                     textbox       textbox       searchbox
1236                     timebox       timebox
1237                     yesno         yesno
1238                     ───────────────────────────────────────────
1239
1240       Some  widgets  are  actually  other widgets, using internal settings to
1241       modify the behavior.  Those use the same widget name as the actual wid‐
1242       get:
1243
1244                            Widget         Actual Widget
1245                            ─────────────────────────────
1246                            dselect        fselect
1247                            infobox        msgbox
1248                            inputmenu      menu
1249                            mixedform      form
1250                            passwordbox    inputbox
1251                            passwordform   form
1252                            prgbox         progressbox
1253                            programbox     progressbox
1254                            tailboxbg      tailbox
1255                            ─────────────────────────────
1256
1257   Built-in Bindings
1258       This  manual  page  does not list the key bindings for each widget, be‐
1259       cause that detailed information can be obtained by running dialog.   If
1260       you have set the --trace option, dialog writes the key-binding informa‐
1261       tion for each widget as it is registered.
1262
1263   Example
1264       Normally dialog uses different keys for navigating between the  buttons
1265       and editing part of a dialog versus navigating within the editing part.
1266       That is, tab (and back-tab) traverse buttons (or  between  buttons  and
1267       the  editing part), while arrow keys traverse fields within the editing
1268       part.  Tabs are also recognized as a special case  for  traversing  be‐
1269       tween widgets, e.g., when using multiple tailboxbg widgets.
1270
1271       Some users may wish to use the same key for traversing within the edit‐
1272       ing part as for traversing between buttons.  The form widget is written
1273       to  support  this sort of redefinition of the keys, by adding a special
1274       group in dlgk_keys.h for “form” (left/right/next/prev).  Here is an ex‐
1275       ample binding demonstrating how to do this:
1276
1277              bindkey formfield TAB  form_NEXT
1278              bindkey formbox   TAB  form_NEXT
1279              bindkey formfield BTAB form_prev
1280              bindkey formbox   BTAB form_prev
1281
1282       That  type  of redefinition would not be useful in other widgets, e.g.,
1283       calendar, due to the potentially large number of fields to traverse.
1284

ENVIRONMENT

1286       DIALOGOPTS     Define this variable to apply any of the common  options
1287                      to  each  widget.   Most of the common options are reset
1288                      before processing each widget.  If you set  the  options
1289                      in  this  environment variable, they are applied to dia‐
1290                      log's state after the reset.  As in the "--file" option,
1291                      double-quotes and backslashes are interpreted.
1292
1293                      The  "--file"  option  is not considered a common option
1294                      (so you cannot embed it within  this  environment  vari‐
1295                      able).
1296
1297       DIALOGRC       Define  this variable if you want to specify the name of
1298                      the configuration file to use.
1299
1300       DIALOG_CANCEL
1301
1302       DIALOG_ERROR
1303
1304       DIALOG_ESC
1305
1306       DIALOG_EXTRA
1307
1308       DIALOG_HELP
1309
1310       DIALOG_ITEM_HELP
1311
1312       DIALOG_OK      Define any of these variables to change the exit code on
1313                      Cancel  (1), error (-1), ESC (255), Extra (3), Help (2),
1314                      Help with --item-help (2), or OK  (0).   Normally  shell
1315                      scripts cannot distinguish between -1 and 255.
1316
1317       DIALOG_TTY     Set  this  variable to “1” to provide compatibility with
1318                      older versions of  dialog  which  assumed  that  if  the
1319                      script  redirects  the standard output, that the "--std‐
1320                      out" option was given.
1321

FILES

1323       $HOME/.dialogrc     default configuration file
1324

EXAMPLES

1326       The dialog sources contain several samples of how to use the  different
1327       box  options  and  how  they look.  Just take a look into the directory
1328       samples/ of the source.
1329

DIAGNOSTICS

1331       Exit status is subject to being overridden  by  environment  variables.
1332       The  default  values  and  corresponding environment variables that can
1333       override them are:
1334
1335       0    if the YES or OK button is pressed (DIALOG_OK).
1336
1337       1    if the No or Cancel button is pressed (DIALOG_CANCEL).
1338
1339       2    if the Help button is pressed (DIALOG_HELP),
1340            except as noted below about DIALOG_ITEM_HELP.
1341
1342       3    if the Extra button is pressed (DIALOG_EXTRA).
1343
1344       4    if the Help button is pressed,
1345            and the --item-help option is set
1346            and the DIALOG_ITEM_HELP environment variable is set to 4.
1347
1348            While any of the exit-codes can be  overridden  using  environment
1349            variables,  this  special  case was introduced in 2004 to simplify
1350            compatibility.  Dialog uses  DIALOG_ITEM_HELP(4)  internally,  but
1351            unless  the  environment  variable is also set, it changes that to
1352            DIALOG_HELP(2) on exit.
1353
1354       -1   if errors occur inside dialog (DIALOG_ERROR) or dialog  exits  be‐
1355            cause the ESC key (DIALOG_ESC) was pressed.
1356

PORTABILITY

1358       Dialog  works  with  X/Open curses.  However, some implementations have
1359       deficiencies:
1360
1361          ·   HPUX curses (and perhaps others) do not open the terminal  prop‐
1362              erly  for  the  newterm function.  This interferes with dialog's
1363              --input-fd option, by preventing cursor-keys and similar  escape
1364              sequences from being recognized.
1365
1366          ·   NetBSD  5.1  curses  has incomplete support for wide-characters.
1367              dialog will build, but not all examples display properly.
1368

COMPATIBILITY

1370       You may want to write scripts which run with other dialog “clones”.
1371
1372   Original Dialog
1373       First, there is the “original” dialog program to consider (versions 0.3
1374       to 0.9).  It had some misspelled (or inconsistent) options.  The dialog
1375       program maps those deprecated options to the preferred ones.  They  in‐
1376       clude:
1377
1378              Option         Treatment
1379              ─────────────────────────────────
1380              --beep-after   ignored
1381              --guage        mapped to --gauge
1382              ─────────────────────────────────
1383
1384   Xdialog
1385       This  is  an  X application, rather than a terminal program.  With some
1386       care, it is possible to write useful scripts that work with both  Xdia‐
1387       log and dialog.
1388
1389       The  dialog program ignores these options which are recognized by Xdia‐
1390       log:
1391
1392              Option             Treatment
1393              ───────────────────────────────────────────────
1394              --allow-close      ignored
1395              --auto-placement   ignored
1396              --fixed-font       ignored
1397              --icon             ignored
1398              --keep-colors      ignored
1399              --no-close         ignored
1400              --no-cr-wrap       ignored
1401              --screen-center    ignored
1402              --separator        mapped to --separate-output
1403              --smooth           ignored
1404              --under-mouse      ignored
1405              --wmclass          ignored
1406              ───────────────────────────────────────────────
1407
1408       Xdialog's manpage has a section discussing its compatibility with  dia‐
1409       log.   There  are some differences not shown in the manpage.  For exam‐
1410       ple, the html documentation states
1411
1412              Note: former Xdialog releases used the "\n" (line feed) as a re‐
1413              sults  separator for the checklist widget; this has been changed
1414              to "/" in Xdialog v1.5.0 to make it compatible  with  (c)dialog.
1415              In  your  old scripts using the Xdialog checklist, you will then
1416              have to add the --separate-output option before the  --checklist
1417              one.
1418
1419       Dialog  has  not  used a different separator; the difference was likely
1420       due to confusion regarding some script.
1421
1422   Whiptail
1423       Then there is whiptail.  For practical purposes, it  is  maintained  by
1424       Debian (very little work is done by its upstream developers).  Its doc‐
1425       umentation (README.whiptail) claims
1426
1427              whiptail(1) is a lightweight replacement for dialog(1),
1428              to provide dialog boxes for shell scripts.
1429              It is built on the
1430              newt windowing library rather than the ncurses library, allowing
1431              it to be smaller in embedded environments such as installers,
1432              rescue disks, etc.
1433
1434              whiptail is designed to be drop-in compatible with dialog, but
1435              has less features: some dialog boxes are not implemented, such
1436              as tailbox, timebox, calendarbox, etc.
1437
1438       Comparing actual sizes (Debian testing, 2007/1/10): The total of  sizes
1439       for whiptail, the newt, popt and slang libraries is 757 KB.  The compa‐
1440       rable number for dialog (counting ncurses) is  520 KB.   Disregard  the
1441       first paragraph.
1442
1443       The  second  paragraph is misleading, since whiptail also does not work
1444       for common options of dialog, such as the gauge box.  whiptail is  less
1445       compatible with dialog than the original mid-1990s dialog 0.4 program.
1446
1447       whiptail's  manpage borrows features from dialog, e.g., but oddly cites
1448       only dialog versions up to 0.4 (1994) as a source.  That is,  its  man‐
1449       page  refers  to features which were borrowed from more recent versions
1450       of dialog, e.g.,
1451
1452       ·   --gauge (from 0.5)
1453
1454       ·   --passwordbox (from Debian changes in 1999),
1455
1456       ·   --default-item (from dialog 2000/02/22),
1457
1458       ·   --output-fd (from dialog 2002/08/14).
1459
1460       Somewhat humorously, one may note that the popt  feature  (undocumented
1461       in its manpage) of using a "--" as an escape was documented in dialog's
1462       manpage about a year before it was  mentioned  in  whiptail's  manpage.
1463       whiptail's  manpage incorrectly attributes that to getopt (and is inac‐
1464       curate anyway).
1465
1466       Debian uses whiptail for the official dialog variation.
1467
1468       The dialog program ignores or maps these options which  are  recognized
1469       by whiptail:
1470
1471              Option            Treatment
1472              ───────────────────────────────────────────
1473              --cancel-button   mapped to --cancel-label
1474              --fb              ignored
1475              --fullbutton      ignored
1476              --no-button       mapped to --no-label
1477              --nocancel        mapped to --no-cancel
1478              --noitem          mapped to --no-items
1479              --notags          mapped to --no-tags
1480              --ok-button       mapped to --ok-label
1481              --scrolltext      mapped to --scrollbar
1482              --topleft         mapped to --begin 0 0
1483              --yes-button      mapped to --yes-label
1484              ───────────────────────────────────────────
1485
1486       There  are  visual  differences which are not addressed by command-line
1487       options:
1488
1489       ·   dialog centers lists within the window.   whiptail  typically  puts
1490           lists against the left margin.
1491
1492       ·   whiptail  uses  angle  brackets  ("<" and ">") for marking buttons.
1493           dialog uses square brackets.
1494
1495       ·   whiptail marks the limits of subtitles with vertical bars.   dialog
1496           does not mark the limits.
1497
1498       ·   whiptail  attempts to mark the top/bottom cells of a scrollbar with
1499           up/down arrows.  When it cannot do this, it fills those cells  with
1500           the background color of the scrollbar and confusing the user.  dia‐
1501           log uses the entire scrollbar space, thereby getting better resolu‐
1502           tion.
1503

BUGS

1505       Perhaps.
1506

AUTHOR

1508       Thomas E. Dickey (updates for 0.9b and beyond)
1509

CONTRIBUTORS

1511       Kiran Cherupally – the mixed form and mixed gauge widgets.
1512
1513       Tobias C. Rittweiler
1514
1515       Valery Reznic – the form and progressbox widgets.
1516
1517       Yura Kalinichenko adapted the gauge widget as “pause”.
1518
1519       This  is  a  rewrite (except as needed to provide compatibility) of the
1520       earlier version of dialog 0.9a, which lists as authors:
1521
1522       ·   Savio Lam – version 0.3, “dialog”
1523
1524       ·   Stuart Herbert – patch for version 0.4
1525
1526       ·   Marc Ewing – the gauge widget.
1527
1528       ·   Pasquale De Marco “Pako” – version 0.9a, “cdialog”
1529
1530
1531
1532$Date: 2019/08/06 21:28:23 $                                         DIALOG(1)
Impressum