1 /* $OpenBSD$ */
2 
3 /*
4  * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
15  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
16  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #include <sys/types.h>
20 
21 #include <string.h>
22 
23 #include "tmux.h"
24 
25 /*
26  * This file has a tables with all the server, session and window
27  * options. These tables are the master copy of the options with their real
28  * (user-visible) types, range limits and default values. At start these are
29  * copied into the runtime global options trees (which only has number and
30  * string types). These tables are then used to look up the real type when the
31  * user sets an option or its value needs to be shown.
32  */
33 
34 /* Choice option type lists. */
35 static const char *options_table_mode_keys_list[] = {
36           "emacs", "vi", NULL
37 };
38 static const char *options_table_clock_mode_style_list[] = {
39           "12", "24", NULL
40 };
41 static const char *options_table_status_list[] = {
42           "off", "on", "2", "3", "4", "5", NULL
43 };
44 static const char *options_table_message_line_list[] = {
45           "0", "1", "2", "3", "4", NULL
46 };
47 static const char *options_table_status_keys_list[] = {
48           "emacs", "vi", NULL
49 };
50 static const char *options_table_status_justify_list[] = {
51           "left", "centre", "right", "absolute-centre", NULL
52 };
53 static const char *options_table_status_position_list[] = {
54           "top", "bottom", NULL
55 };
56 static const char *options_table_bell_action_list[] = {
57           "none", "any", "current", "other", NULL
58 };
59 static const char *options_table_visual_bell_list[] = {
60           "off", "on", "both", NULL
61 };
62 static const char *options_table_cursor_style_list[] = {
63           "default", "blinking-block", "block", "blinking-underline", "underline",
64           "blinking-bar", "bar", NULL
65 };
66 static const char *options_table_pane_status_list[] = {
67           "off", "top", "bottom", NULL
68 };
69 static const char *options_table_pane_border_indicators_list[] = {
70           "off", "colour", "arrows", "both", NULL
71 };
72 static const char *options_table_pane_border_lines_list[] = {
73           "single", "double", "heavy", "simple", "number", NULL
74 };
75 static const char *options_table_popup_border_lines_list[] = {
76           "single", "double", "heavy", "simple", "rounded", "padded", "none", NULL
77 };
78 static const char *options_table_set_clipboard_list[] = {
79           "off", "external", "on", NULL
80 };
81 static const char *options_table_window_size_list[] = {
82           "largest", "smallest", "manual", "latest", NULL
83 };
84 static const char *options_table_remain_on_exit_list[] = {
85           "off", "on", "failed", NULL
86 };
87 static const char *options_table_destroy_unattached_list[] = {
88           "off", "on", "keep-last", "keep-group", NULL
89 };
90 static const char *options_table_detach_on_destroy_list[] = {
91           "off", "on", "no-detached", "previous", "next", NULL
92 };
93 static const char *options_table_extended_keys_list[] = {
94           "off", "on", "always", NULL
95 };
96 static const char *options_table_extended_keys_format_list[] = {
97           "csi-u", "xterm", NULL
98 };
99 static const char *options_table_allow_passthrough_list[] = {
100           "off", "on", "all", NULL
101 };
102 
103 /* Status line format. */
104 #define OPTIONS_TABLE_STATUS_FORMAT1 \
105           "#[align=left range=left #{E:status-left-style}]" \
106           "#[push-default]" \
107           "#{T;=/#{status-left-length}:status-left}" \
108           "#[pop-default]" \
109           "#[norange default]" \
110           "#[list=on align=#{status-justify}]" \
111           "#[list=left-marker]<#[list=right-marker]>#[list=on]" \
112           "#{W:" \
113                     "#[range=window|#{window_index} " \
114                               "#{E:window-status-style}" \
115                               "#{?#{&&:#{window_last_flag}," \
116                                         "#{!=:#{E:window-status-last-style},default}}, " \
117                                         "#{E:window-status-last-style}," \
118                               "}" \
119                               "#{?#{&&:#{window_bell_flag}," \
120                                         "#{!=:#{E:window-status-bell-style},default}}, " \
121                                         "#{E:window-status-bell-style}," \
122                                         "#{?#{&&:#{||:#{window_activity_flag}," \
123                                                        "#{window_silence_flag}}," \
124                                                   "#{!=:" \
125                                                   "#{E:window-status-activity-style}," \
126                                                   "default}}, " \
127                                                   "#{E:window-status-activity-style}," \
128                                         "}" \
129                               "}" \
130                     "]" \
131                     "#[push-default]" \
132                     "#{T:window-status-format}" \
133                     "#[pop-default]" \
134                     "#[norange default]" \
135                     "#{?window_end_flag,,#{window-status-separator}}" \
136           "," \
137                     "#[range=window|#{window_index} list=focus " \
138                               "#{?#{!=:#{E:window-status-current-style},default}," \
139                                         "#{E:window-status-current-style}," \
140                                         "#{E:window-status-style}" \
141                               "}" \
142                               "#{?#{&&:#{window_last_flag}," \
143                                         "#{!=:#{E:window-status-last-style},default}}, " \
144                                         "#{E:window-status-last-style}," \
145                               "}" \
146                               "#{?#{&&:#{window_bell_flag}," \
147                                         "#{!=:#{E:window-status-bell-style},default}}, " \
148                                         "#{E:window-status-bell-style}," \
149                                         "#{?#{&&:#{||:#{window_activity_flag}," \
150                                                        "#{window_silence_flag}}," \
151                                                   "#{!=:" \
152                                                   "#{E:window-status-activity-style}," \
153                                                   "default}}, " \
154                                                   "#{E:window-status-activity-style}," \
155                                         "}" \
156                               "}" \
157                     "]" \
158                     "#[push-default]" \
159                     "#{T:window-status-current-format}" \
160                     "#[pop-default]" \
161                     "#[norange list=on default]" \
162                     "#{?window_end_flag,,#{window-status-separator}}" \
163           "}" \
164           "#[nolist align=right range=right #{E:status-right-style}]" \
165           "#[push-default]" \
166           "#{T;=/#{status-right-length}:status-right}" \
167           "#[pop-default]" \
168           "#[norange default]"
169 #define OPTIONS_TABLE_STATUS_FORMAT2 \
170           "#[align=centre]#{P:#{?pane_active,#[reverse],}" \
171           "#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
172 static const char *options_table_status_format_default[] = {
173           OPTIONS_TABLE_STATUS_FORMAT1, OPTIONS_TABLE_STATUS_FORMAT2, NULL
174 };
175 
176 /* Helpers for hook options. */
177 #define OPTIONS_TABLE_HOOK(hook_name, default_value) \
178           { .name = hook_name, \
179             .type = OPTIONS_TABLE_COMMAND, \
180             .scope = OPTIONS_TABLE_SESSION, \
181             .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
182             .default_str = default_value,         \
183             .separator = "" \
184           }
185 
186 #define OPTIONS_TABLE_PANE_HOOK(hook_name, default_value) \
187           { .name = hook_name, \
188             .type = OPTIONS_TABLE_COMMAND, \
189             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE, \
190             .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
191             .default_str = default_value,         \
192             .separator = "" \
193           }
194 
195 #define OPTIONS_TABLE_WINDOW_HOOK(hook_name, default_value) \
196           { .name = hook_name, \
197             .type = OPTIONS_TABLE_COMMAND, \
198             .scope = OPTIONS_TABLE_WINDOW, \
199             .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
200             .default_str = default_value,         \
201             .separator = "" \
202           }
203 
204 /* Map of name conversions. */
205 const struct options_name_map options_other_names[] = {
206           { "display-panes-color", "display-panes-colour" },
207           { "display-panes-active-color", "display-panes-active-colour" },
208           { "clock-mode-color", "clock-mode-colour" },
209           { "cursor-color", "cursor-colour" },
210           { "pane-colors", "pane-colours" },
211           { NULL, NULL }
212 };
213 
214 /* Top-level options. */
215 const struct options_table_entry options_table[] = {
216           /* Server options. */
217           { .name = "backspace",
218             .type = OPTIONS_TABLE_KEY,
219             .scope = OPTIONS_TABLE_SERVER,
220             .default_num = '\177',
221             .text = "The key to send for backspace."
222           },
223 
224           { .name = "buffer-limit",
225             .type = OPTIONS_TABLE_NUMBER,
226             .scope = OPTIONS_TABLE_SERVER,
227             .minimum = 1,
228             .maximum = INT_MAX,
229             .default_num = 50,
230             .text = "The maximum number of automatic buffers. "
231                       "When this is reached, the oldest buffer is deleted."
232           },
233 
234           { .name = "command-alias",
235             .type = OPTIONS_TABLE_STRING,
236             .scope = OPTIONS_TABLE_SERVER,
237             .flags = OPTIONS_TABLE_IS_ARRAY,
238             .default_str = "split-pane=split-window,"
239                                "splitp=split-window,"
240                                "server-info=show-messages -JT,"
241                                "info=show-messages -JT,"
242                                "choose-window=choose-tree -w,"
243                                "choose-session=choose-tree -s",
244             .separator = ",",
245             .text = "Array of command aliases. "
246                       "Each entry is an alias and a command separated by '='."
247           },
248 
249           { .name = "copy-command",
250             .type = OPTIONS_TABLE_STRING,
251             .scope = OPTIONS_TABLE_SERVER,
252             .default_str = "",
253             .text = "Shell command run when text is copied. "
254                       "If empty, no command is run."
255           },
256 
257           { .name = "cursor-colour",
258             .type = OPTIONS_TABLE_COLOUR,
259             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
260             .default_num = -1,
261             .text = "Colour of the cursor."
262           },
263 
264           { .name = "cursor-style",
265             .type = OPTIONS_TABLE_CHOICE,
266             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
267             .choices = options_table_cursor_style_list,
268             .default_num = 0,
269             .text = "Style of the cursor."
270           },
271 
272           { .name = "default-terminal",
273             .type = OPTIONS_TABLE_STRING,
274             .scope = OPTIONS_TABLE_SERVER,
275             .default_str = TMUX_TERM,
276             .text = "Default for the 'TERM' environment variable."
277           },
278 
279           { .name = "editor",
280             .type = OPTIONS_TABLE_STRING,
281             .scope = OPTIONS_TABLE_SERVER,
282             .default_str = _PATH_VI,
283             .text = "Editor run to edit files."
284           },
285 
286           { .name = "escape-time",
287             .type = OPTIONS_TABLE_NUMBER,
288             .scope = OPTIONS_TABLE_SERVER,
289             .minimum = 0,
290             .maximum = INT_MAX,
291             .default_num = 10,
292             .unit = "milliseconds",
293             .text = "Time to wait before assuming a key is Escape."
294           },
295 
296           { .name = "exit-empty",
297             .type = OPTIONS_TABLE_FLAG,
298             .scope = OPTIONS_TABLE_SERVER,
299             .default_num = 1,
300             .text = "Whether the server should exit if there are no sessions."
301           },
302 
303           { .name = "exit-unattached",
304             .type = OPTIONS_TABLE_FLAG,
305             .scope = OPTIONS_TABLE_SERVER,
306             .default_num = 0,
307             .text = "Whether the server should exit if there are no attached "
308                       "clients."
309           },
310 
311           { .name = "extended-keys",
312             .type = OPTIONS_TABLE_CHOICE,
313             .scope = OPTIONS_TABLE_SERVER,
314             .choices = options_table_extended_keys_list,
315             .default_num = 0,
316             .text = "Whether to request extended key sequences from terminals "
317                       "that support it."
318           },
319 
320           { .name = "extended-keys-format",
321             .type = OPTIONS_TABLE_CHOICE,
322             .scope = OPTIONS_TABLE_SERVER,
323             .choices = options_table_extended_keys_format_list,
324             .default_num = 1,
325             .text = "The format of emitted extended key sequences."
326           },
327 
328           { .name = "focus-events",
329             .type = OPTIONS_TABLE_FLAG,
330             .scope = OPTIONS_TABLE_SERVER,
331             .default_num = 0,
332             .text = "Whether to send focus events to applications."
333           },
334 
335           { .name = "history-file",
336             .type = OPTIONS_TABLE_STRING,
337             .scope = OPTIONS_TABLE_SERVER,
338             .default_str = "",
339             .text = "Location of the command prompt history file. "
340                       "Empty does not write a history file."
341           },
342 
343           { .name = "menu-style",
344             .type = OPTIONS_TABLE_STRING,
345             .scope = OPTIONS_TABLE_WINDOW,
346             .flags = OPTIONS_TABLE_IS_STYLE,
347             .default_str = "default",
348             .separator = ",",
349             .text = "Default style of menu."
350           },
351 
352           { .name = "menu-selected-style",
353             .type = OPTIONS_TABLE_STRING,
354             .scope = OPTIONS_TABLE_WINDOW,
355             .flags = OPTIONS_TABLE_IS_STYLE,
356             .default_str = "bg=yellow,fg=black",
357             .separator = ",",
358             .text = "Default style of selected menu item."
359           },
360 
361           { .name = "menu-border-style",
362             .type = OPTIONS_TABLE_STRING,
363             .scope = OPTIONS_TABLE_WINDOW,
364             .default_str = "default",
365             .flags = OPTIONS_TABLE_IS_STYLE,
366             .separator = ",",
367             .text = "Default style of menu borders."
368           },
369 
370           { .name = "menu-border-lines",
371             .type = OPTIONS_TABLE_CHOICE,
372             .scope = OPTIONS_TABLE_WINDOW,
373             .choices = options_table_popup_border_lines_list,
374             .default_num = BOX_LINES_SINGLE,
375             .text = "Type of characters used to draw menu border lines. Some of "
376                     "these are only supported on terminals with UTF-8 support."
377           },
378 
379           { .name = "message-limit",
380             .type = OPTIONS_TABLE_NUMBER,
381             .scope = OPTIONS_TABLE_SERVER,
382             .minimum = 0,
383             .maximum = INT_MAX,
384             .default_num = 1000,
385             .text = "Maximum number of server messages to keep."
386           },
387 
388           { .name = "prefix-timeout",
389             .type = OPTIONS_TABLE_NUMBER,
390             .scope = OPTIONS_TABLE_SERVER,
391             .minimum = 0,
392             .maximum = INT_MAX,
393             .default_num = 0,
394             .unit = "milliseconds",
395             .text = "The timeout for the prefix key if no subsequent key is "
396                     "pressed. Zero means disabled."
397           },
398 
399           { .name = "prompt-history-limit",
400             .type = OPTIONS_TABLE_NUMBER,
401             .scope = OPTIONS_TABLE_SERVER,
402             .minimum = 0,
403             .maximum = INT_MAX,
404             .default_num = 100,
405             .text = "Maximum number of commands to keep in history."
406           },
407 
408           { .name = "set-clipboard",
409             .type = OPTIONS_TABLE_CHOICE,
410             .scope = OPTIONS_TABLE_SERVER,
411             .choices = options_table_set_clipboard_list,
412             .default_num = 1,
413             .text = "Whether to attempt to set the system clipboard ('on' or "
414                       "'external') and whether to allow applications to create "
415                       "paste buffers with an escape sequence ('on' only)."
416           },
417 
418           { .name = "terminal-overrides",
419             .type = OPTIONS_TABLE_STRING,
420             .scope = OPTIONS_TABLE_SERVER,
421             .flags = OPTIONS_TABLE_IS_ARRAY,
422             .default_str = "linux*:AX@",
423             .separator = ",",
424             .text = "List of terminal capabilities overrides."
425           },
426 
427           { .name = "terminal-features",
428             .type = OPTIONS_TABLE_STRING,
429             .scope = OPTIONS_TABLE_SERVER,
430             .flags = OPTIONS_TABLE_IS_ARRAY,
431             .default_str = "xterm*:clipboard:ccolour:cstyle:focus:title,"
432                                "screen*:title,"
433                            "rxvt*:ignorefkeys",
434             .separator = ",",
435             .text = "List of terminal features, used if they cannot be "
436                       "automatically detected."
437           },
438 
439           { .name = "user-keys",
440             .type = OPTIONS_TABLE_STRING,
441             .scope = OPTIONS_TABLE_SERVER,
442             .flags = OPTIONS_TABLE_IS_ARRAY,
443             .default_str = "",
444             .separator = ",",
445             .text = "User key assignments. "
446                       "Each sequence in the list is translated into a key: "
447                       "'User0', 'User1' and so on."
448           },
449 
450           /* Session options. */
451           { .name = "activity-action",
452             .type = OPTIONS_TABLE_CHOICE,
453             .scope = OPTIONS_TABLE_SESSION,
454             .choices = options_table_bell_action_list,
455             .default_num = ALERT_OTHER,
456             .text = "Action to take on an activity alert."
457           },
458 
459           { .name = "assume-paste-time",
460             .type = OPTIONS_TABLE_NUMBER,
461             .scope = OPTIONS_TABLE_SESSION,
462             .minimum = 0,
463             .maximum = INT_MAX,
464             .default_num = 1,
465             .unit = "milliseconds",
466             .text = "Maximum time between input to assume it is pasting rather "
467                       "than typing."
468           },
469 
470           { .name = "base-index",
471             .type = OPTIONS_TABLE_NUMBER,
472             .scope = OPTIONS_TABLE_SESSION,
473             .minimum = 0,
474             .maximum = INT_MAX,
475             .default_num = 0,
476             .text = "Default index of the first window in each session."
477           },
478 
479           { .name = "bell-action",
480             .type = OPTIONS_TABLE_CHOICE,
481             .scope = OPTIONS_TABLE_SESSION,
482             .choices = options_table_bell_action_list,
483             .default_num = ALERT_ANY,
484             .text = "Action to take on a bell alert."
485           },
486 
487           { .name = "default-command",
488             .type = OPTIONS_TABLE_STRING,
489             .scope = OPTIONS_TABLE_SESSION,
490             .default_str = "",
491             .text = "Default command to run in new panes. If empty, a shell is "
492                       "started."
493           },
494 
495           { .name = "default-shell",
496             .type = OPTIONS_TABLE_STRING,
497             .scope = OPTIONS_TABLE_SESSION,
498             .default_str = _PATH_BSHELL,
499             .text = "Location of default shell."
500           },
501 
502           { .name = "default-size",
503             .type = OPTIONS_TABLE_STRING,
504             .scope = OPTIONS_TABLE_SESSION,
505             .pattern = "[0-9]*x[0-9]*",
506             .default_str = "80x24",
507             .text = "Initial size of new sessions."
508           },
509 
510           { .name = "destroy-unattached",
511             .type = OPTIONS_TABLE_CHOICE,
512             .scope = OPTIONS_TABLE_SESSION,
513             .choices = options_table_destroy_unattached_list,
514             .default_num = 0,
515             .text = "Whether to destroy sessions when they have no attached "
516                       "clients, or keep the last session whether in the group."
517           },
518 
519           { .name = "detach-on-destroy",
520             .type = OPTIONS_TABLE_CHOICE,
521             .scope = OPTIONS_TABLE_SESSION,
522             .choices = options_table_detach_on_destroy_list,
523             .default_num = 1,
524             .text = "Whether to detach when a session is destroyed, or switch "
525                       "the client to another session if any exist."
526           },
527 
528           { .name = "display-panes-active-colour",
529             .type = OPTIONS_TABLE_COLOUR,
530             .scope = OPTIONS_TABLE_SESSION,
531             .default_num = 1,
532             .text = "Colour of the active pane for 'display-panes'."
533           },
534 
535           { .name = "display-panes-colour",
536             .type = OPTIONS_TABLE_COLOUR,
537             .scope = OPTIONS_TABLE_SESSION,
538             .default_num = 4,
539             .text = "Colour of not active panes for 'display-panes'."
540           },
541 
542           { .name = "display-panes-time",
543             .type = OPTIONS_TABLE_NUMBER,
544             .scope = OPTIONS_TABLE_SESSION,
545             .minimum = 1,
546             .maximum = INT_MAX,
547             .default_num = 1000,
548             .unit = "milliseconds",
549             .text = "Time for which 'display-panes' should show pane numbers."
550           },
551 
552           { .name = "display-time",
553             .type = OPTIONS_TABLE_NUMBER,
554             .scope = OPTIONS_TABLE_SESSION,
555             .minimum = 0,
556             .maximum = INT_MAX,
557             .default_num = 750,
558             .unit = "milliseconds",
559             .text = "Time for which status line messages should appear."
560           },
561 
562           { .name = "history-limit",
563             .type = OPTIONS_TABLE_NUMBER,
564             .scope = OPTIONS_TABLE_SESSION,
565             .minimum = 0,
566             .maximum = INT_MAX,
567             .default_num = 2000,
568             .unit = "lines",
569             .text = "Maximum number of lines to keep in the history for each "
570                       "pane. "
571                       "If changed, the new value applies only to new panes."
572           },
573 
574           { .name = "key-table",
575             .type = OPTIONS_TABLE_STRING,
576             .scope = OPTIONS_TABLE_SESSION,
577             .default_str = "root",
578             .text = "Default key table. "
579                       "Key presses are first looked up in this table."
580           },
581 
582           { .name = "lock-after-time",
583             .type = OPTIONS_TABLE_NUMBER,
584             .scope = OPTIONS_TABLE_SESSION,
585             .minimum = 0,
586             .maximum = INT_MAX,
587             .default_num = 0,
588             .unit = "seconds",
589             .text = "Time after which a client is locked if not used."
590           },
591 
592           { .name = "lock-command",
593             .type = OPTIONS_TABLE_STRING,
594             .scope = OPTIONS_TABLE_SESSION,
595             .default_str = TMUX_LOCK_CMD,
596             .text = "Shell command to run to lock a client."
597           },
598 
599           { .name = "message-command-style",
600             .type = OPTIONS_TABLE_STRING,
601             .scope = OPTIONS_TABLE_SESSION,
602             .default_str = "bg=black,fg=yellow",
603             .flags = OPTIONS_TABLE_IS_STYLE,
604             .separator = ",",
605             .text = "Style of the command prompt when in command mode, if "
606                       "'mode-keys' is set to 'vi'."
607           },
608 
609           { .name = "message-line",
610             .type = OPTIONS_TABLE_CHOICE,
611             .scope = OPTIONS_TABLE_SESSION,
612             .choices = options_table_message_line_list,
613             .default_num = 0,
614             .text = "Position (line) of messages and the command prompt."
615           },
616 
617           { .name = "message-style",
618             .type = OPTIONS_TABLE_STRING,
619             .scope = OPTIONS_TABLE_SESSION,
620             .default_str = "bg=yellow,fg=black",
621             .flags = OPTIONS_TABLE_IS_STYLE,
622             .separator = ",",
623             .text = "Style of messages and the command prompt."
624           },
625 
626           { .name = "mouse",
627             .type = OPTIONS_TABLE_FLAG,
628             .scope = OPTIONS_TABLE_SESSION,
629             .default_num = 0,
630             .text = "Whether the mouse is recognised and mouse key bindings are "
631                       "executed. "
632                       "Applications inside panes can use the mouse even when 'off'."
633           },
634 
635           { .name = "prefix",
636             .type = OPTIONS_TABLE_KEY,
637             .scope = OPTIONS_TABLE_SESSION,
638             .default_num = 'b'|KEYC_CTRL,
639             .text = "The prefix key."
640           },
641 
642           { .name = "prefix2",
643             .type = OPTIONS_TABLE_KEY,
644             .scope = OPTIONS_TABLE_SESSION,
645             .default_num = KEYC_NONE,
646             .text = "A second prefix key."
647           },
648 
649           { .name = "renumber-windows",
650             .type = OPTIONS_TABLE_FLAG,
651             .scope = OPTIONS_TABLE_SESSION,
652             .default_num = 0,
653             .text = "Whether windows are automatically renumbered rather than "
654                       "leaving gaps."
655           },
656 
657           { .name = "repeat-time",
658             .type = OPTIONS_TABLE_NUMBER,
659             .scope = OPTIONS_TABLE_SESSION,
660             .minimum = 0,
661             .maximum = SHRT_MAX,
662             .default_num = 500,
663             .unit = "milliseconds",
664             .text = "Time to wait for a key binding to repeat, if it is bound "
665                       "with the '-r' flag."
666           },
667 
668           { .name = "set-titles",
669             .type = OPTIONS_TABLE_FLAG,
670             .scope = OPTIONS_TABLE_SESSION,
671             .default_num = 0,
672             .text = "Whether to set the terminal title, if supported."
673           },
674 
675           { .name = "set-titles-string",
676             .type = OPTIONS_TABLE_STRING,
677             .scope = OPTIONS_TABLE_SESSION,
678             .default_str = "#S:#I:#W - \"#T\" #{session_alerts}",
679             .text = "Format of the terminal title to set."
680           },
681 
682           { .name = "silence-action",
683             .type = OPTIONS_TABLE_CHOICE,
684             .scope = OPTIONS_TABLE_SESSION,
685             .choices = options_table_bell_action_list,
686             .default_num = ALERT_OTHER,
687             .text = "Action to take on a silence alert."
688           },
689 
690           { .name = "status",
691             .type = OPTIONS_TABLE_CHOICE,
692             .scope = OPTIONS_TABLE_SESSION,
693             .choices = options_table_status_list,
694             .default_num = 1,
695             .text = "Number of lines in the status line."
696           },
697 
698           { .name = "status-bg",
699             .type = OPTIONS_TABLE_COLOUR,
700             .scope = OPTIONS_TABLE_SESSION,
701             .default_num = 8,
702             .text = "Background colour of the status line. This option is "
703                       "deprecated, use 'status-style' instead."
704           },
705 
706           { .name = "status-fg",
707             .type = OPTIONS_TABLE_COLOUR,
708             .scope = OPTIONS_TABLE_SESSION,
709             .default_num = 8,
710             .text = "Foreground colour of the status line. This option is "
711                       "deprecated, use 'status-style' instead."
712           },
713 
714           { .name = "status-format",
715             .type = OPTIONS_TABLE_STRING,
716             .scope = OPTIONS_TABLE_SESSION,
717             .flags = OPTIONS_TABLE_IS_ARRAY,
718             .default_arr = options_table_status_format_default,
719             .text = "Formats for the status lines. "
720                       "Each array member is the format for one status line. "
721                       "The default status line is made up of several components "
722                       "which may be configured individually with other options such "
723                       "as 'status-left'."
724           },
725 
726           { .name = "status-interval",
727             .type = OPTIONS_TABLE_NUMBER,
728             .scope = OPTIONS_TABLE_SESSION,
729             .minimum = 0,
730             .maximum = INT_MAX,
731             .default_num = 15,
732             .unit = "seconds",
733             .text = "Number of seconds between status line updates."
734           },
735 
736           { .name = "status-justify",
737             .type = OPTIONS_TABLE_CHOICE,
738             .scope = OPTIONS_TABLE_SESSION,
739             .choices = options_table_status_justify_list,
740             .default_num = 0,
741             .text = "Position of the window list in the status line."
742           },
743 
744           { .name = "status-keys",
745             .type = OPTIONS_TABLE_CHOICE,
746             .scope = OPTIONS_TABLE_SESSION,
747             .choices = options_table_status_keys_list,
748             .default_num = MODEKEY_EMACS,
749             .text = "Key set to use at the command prompt."
750           },
751 
752           { .name = "status-left",
753             .type = OPTIONS_TABLE_STRING,
754             .scope = OPTIONS_TABLE_SESSION,
755             .default_str = "[#{session_name}] ",
756             .text = "Contents of the left side of the status line."
757           },
758 
759           { .name = "status-left-length",
760             .type = OPTIONS_TABLE_NUMBER,
761             .scope = OPTIONS_TABLE_SESSION,
762             .minimum = 0,
763             .maximum = SHRT_MAX,
764             .default_num = 10,
765             .text = "Maximum width of the left side of the status line."
766           },
767 
768           { .name = "status-left-style",
769             .type = OPTIONS_TABLE_STRING,
770             .scope = OPTIONS_TABLE_SESSION,
771             .default_str = "default",
772             .flags = OPTIONS_TABLE_IS_STYLE,
773             .separator = ",",
774             .text = "Style of the left side of the status line."
775           },
776 
777           { .name = "status-position",
778             .type = OPTIONS_TABLE_CHOICE,
779             .scope = OPTIONS_TABLE_SESSION,
780             .choices = options_table_status_position_list,
781             .default_num = 1,
782             .text = "Position of the status line."
783           },
784 
785           { .name = "status-right",
786             .type = OPTIONS_TABLE_STRING,
787             .scope = OPTIONS_TABLE_SESSION,
788             .default_str = "#{?window_bigger,"
789                                "[#{window_offset_x}#,#{window_offset_y}] ,}"
790                                "\"#{=21:pane_title}\" %H:%M %d-%b-%y",
791             .text = "Contents of the right side of the status line."
792 
793           },
794 
795           { .name = "status-right-length",
796             .type = OPTIONS_TABLE_NUMBER,
797             .scope = OPTIONS_TABLE_SESSION,
798             .minimum = 0,
799             .maximum = SHRT_MAX,
800             .default_num = 40,
801             .text = "Maximum width of the right side of the status line."
802           },
803 
804           { .name = "status-right-style",
805             .type = OPTIONS_TABLE_STRING,
806             .scope = OPTIONS_TABLE_SESSION,
807             .default_str = "default",
808             .flags = OPTIONS_TABLE_IS_STYLE,
809             .separator = ",",
810             .text = "Style of the right side of the status line."
811           },
812 
813           { .name = "status-style",
814             .type = OPTIONS_TABLE_STRING,
815             .scope = OPTIONS_TABLE_SESSION,
816             .default_str = "bg=green,fg=black",
817             .flags = OPTIONS_TABLE_IS_STYLE,
818             .separator = ",",
819             .text = "Style of the status line."
820           },
821 
822           { .name = "update-environment",
823             .type = OPTIONS_TABLE_STRING,
824             .scope = OPTIONS_TABLE_SESSION,
825             .flags = OPTIONS_TABLE_IS_ARRAY,
826             .default_str = "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
827                                "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY",
828             .text = "List of environment variables to update in the session "
829                       "environment when a client is attached."
830           },
831 
832           { .name = "visual-activity",
833             .type = OPTIONS_TABLE_CHOICE,
834             .scope = OPTIONS_TABLE_SESSION,
835             .choices = options_table_visual_bell_list,
836             .default_num = VISUAL_OFF,
837             .text = "How activity alerts should be shown: a message ('on'), "
838                       "a message and a bell ('both') or nothing ('off')."
839           },
840 
841           { .name = "visual-bell",
842             .type = OPTIONS_TABLE_CHOICE,
843             .scope = OPTIONS_TABLE_SESSION,
844             .choices = options_table_visual_bell_list,
845             .default_num = VISUAL_OFF,
846             .text = "How bell alerts should be shown: a message ('on'), "
847                       "a message and a bell ('both') or nothing ('off')."
848           },
849 
850           { .name = "visual-silence",
851             .type = OPTIONS_TABLE_CHOICE,
852             .scope = OPTIONS_TABLE_SESSION,
853             .choices = options_table_visual_bell_list,
854             .default_num = VISUAL_OFF,
855             .text = "How silence alerts should be shown: a message ('on'), "
856                       "a message and a bell ('both') or nothing ('off')."
857           },
858 
859           { .name = "word-separators",
860             .type = OPTIONS_TABLE_STRING,
861             .scope = OPTIONS_TABLE_SESSION,
862             /*
863              * The set of non-alphanumeric printable ASCII characters minus the
864              * underscore.
865              */
866             .default_str = "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",
867             .text = "Characters considered to separate words."
868           },
869 
870           /* Window options. */
871           { .name = "aggressive-resize",
872             .type = OPTIONS_TABLE_FLAG,
873             .scope = OPTIONS_TABLE_WINDOW,
874             .default_num = 0,
875             .text = "When 'window-size' is 'smallest', whether the maximum size "
876                       "of a window is the smallest attached session where it is "
877                       "the current window ('on') or the smallest session it is "
878                       "linked to ('off')."
879           },
880 
881           { .name = "allow-passthrough",
882             .type = OPTIONS_TABLE_CHOICE,
883             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
884             .choices = options_table_allow_passthrough_list,
885             .default_num = 0,
886             .text = "Whether applications are allowed to use the escape sequence "
887                       "to bypass tmux. Can be 'off' (disallowed), 'on' (allowed "
888                       "if the pane is visible), or 'all' (allowed even if the pane "
889                       "is invisible)."
890           },
891 
892           { .name = "allow-rename",
893             .type = OPTIONS_TABLE_FLAG,
894             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
895             .default_num = 0,
896             .text = "Whether applications are allowed to use the escape sequence "
897                       "to rename windows."
898           },
899 
900           { .name = "allow-set-title",
901             .type = OPTIONS_TABLE_FLAG,
902             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
903             .default_num = 1,
904             .text = "Whether applications are allowed to use the escape sequence "
905                       "to set the pane title."
906           },
907 
908           { .name = "alternate-screen",
909             .type = OPTIONS_TABLE_FLAG,
910             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
911             .default_num = 1,
912             .text = "Whether applications are allowed to use the alternate "
913                       "screen."
914           },
915 
916           { .name = "automatic-rename",
917             .type = OPTIONS_TABLE_FLAG,
918             .scope = OPTIONS_TABLE_WINDOW,
919             .default_num = 1,
920             .text = "Whether windows are automatically renamed."
921           },
922 
923           { .name = "automatic-rename-format",
924             .type = OPTIONS_TABLE_STRING,
925             .scope = OPTIONS_TABLE_WINDOW,
926             .default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}"
927                                "#{?pane_dead,[dead],}",
928             .text = "Format used to automatically rename windows."
929           },
930 
931           { .name = "clock-mode-colour",
932             .type = OPTIONS_TABLE_COLOUR,
933             .scope = OPTIONS_TABLE_WINDOW,
934             .default_num = 4,
935             .text = "Colour of the clock in clock mode."
936           },
937 
938           { .name = "clock-mode-style",
939             .type = OPTIONS_TABLE_CHOICE,
940             .scope = OPTIONS_TABLE_WINDOW,
941             .choices = options_table_clock_mode_style_list,
942             .default_num = 1,
943             .text = "Time format of the clock in clock mode."
944           },
945 
946           { .name = "copy-mode-match-style",
947             .type = OPTIONS_TABLE_STRING,
948             .scope = OPTIONS_TABLE_WINDOW,
949             .default_str = "bg=cyan,fg=black",
950             .flags = OPTIONS_TABLE_IS_STYLE,
951             .separator = ",",
952             .text = "Style of search matches in copy mode."
953           },
954 
955           { .name = "copy-mode-current-match-style",
956             .type = OPTIONS_TABLE_STRING,
957             .scope = OPTIONS_TABLE_WINDOW,
958             .default_str = "bg=magenta,fg=black",
959             .flags = OPTIONS_TABLE_IS_STYLE,
960             .separator = ",",
961             .text = "Style of the current search match in copy mode."
962           },
963 
964           { .name = "copy-mode-mark-style",
965             .type = OPTIONS_TABLE_STRING,
966             .scope = OPTIONS_TABLE_WINDOW,
967             .default_str = "bg=red,fg=black",
968             .flags = OPTIONS_TABLE_IS_STYLE,
969             .separator = ",",
970             .text = "Style of the marked line in copy mode."
971           },
972 
973           { .name = "fill-character",
974             .type = OPTIONS_TABLE_STRING,
975             .scope = OPTIONS_TABLE_WINDOW,
976             .default_str = "",
977             .text = "Character used to fill unused parts of window."
978           },
979 
980           { .name = "main-pane-height",
981             .type = OPTIONS_TABLE_STRING,
982             .scope = OPTIONS_TABLE_WINDOW,
983             .default_str = "24",
984             .text = "Height of the main pane in the 'main-horizontal' layout. "
985                       "This may be a percentage, for example '10%'."
986           },
987 
988           { .name = "main-pane-width",
989             .type = OPTIONS_TABLE_STRING,
990             .scope = OPTIONS_TABLE_WINDOW,
991             .default_str = "80",
992             .text = "Width of the main pane in the 'main-vertical' layout. "
993                       "This may be a percentage, for example '10%'."
994           },
995 
996           { .name = "mode-keys",
997             .type = OPTIONS_TABLE_CHOICE,
998             .scope = OPTIONS_TABLE_WINDOW,
999             .choices = options_table_mode_keys_list,
1000             .default_num = MODEKEY_EMACS,
1001             .text = "Key set used in copy mode."
1002           },
1003 
1004           { .name = "mode-style",
1005             .type = OPTIONS_TABLE_STRING,
1006             .scope = OPTIONS_TABLE_WINDOW,
1007             .flags = OPTIONS_TABLE_IS_STYLE,
1008             .default_str = "bg=yellow,fg=black",
1009             .separator = ",",
1010             .text = "Style of indicators and highlighting in modes."
1011           },
1012 
1013           { .name = "monitor-activity",
1014             .type = OPTIONS_TABLE_FLAG,
1015             .scope = OPTIONS_TABLE_WINDOW,
1016             .default_num = 0,
1017             .text = "Whether an alert is triggered by activity."
1018           },
1019 
1020           { .name = "monitor-bell",
1021             .type = OPTIONS_TABLE_FLAG,
1022             .scope = OPTIONS_TABLE_WINDOW,
1023             .default_num = 1,
1024             .text = "Whether an alert is triggered by a bell."
1025           },
1026 
1027           { .name = "monitor-silence",
1028             .type = OPTIONS_TABLE_NUMBER,
1029             .scope = OPTIONS_TABLE_WINDOW,
1030             .minimum = 0,
1031             .maximum = INT_MAX,
1032             .default_num = 0,
1033             .text = "Time after which an alert is triggered by silence. "
1034                       "Zero means no alert."
1035 
1036           },
1037 
1038           { .name = "other-pane-height",
1039             .type = OPTIONS_TABLE_STRING,
1040             .scope = OPTIONS_TABLE_WINDOW,
1041             .default_str = "0",
1042             .text = "Height of the other panes in the 'main-horizontal' layout. "
1043                       "This may be a percentage, for example '10%'."
1044           },
1045 
1046           { .name = "other-pane-width",
1047             .type = OPTIONS_TABLE_STRING,
1048             .scope = OPTIONS_TABLE_WINDOW,
1049             .default_str = "0",
1050             .text = "Height of the other panes in the 'main-vertical' layout. "
1051                       "This may be a percentage, for example '10%'."
1052           },
1053 
1054           { .name = "pane-active-border-style",
1055             .type = OPTIONS_TABLE_STRING,
1056             .scope = OPTIONS_TABLE_WINDOW,
1057             .default_str = "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}",
1058             .flags = OPTIONS_TABLE_IS_STYLE,
1059             .separator = ",",
1060             .text = "Style of the active pane border."
1061           },
1062 
1063           { .name = "pane-base-index",
1064             .type = OPTIONS_TABLE_NUMBER,
1065             .scope = OPTIONS_TABLE_WINDOW,
1066             .minimum = 0,
1067             .maximum = USHRT_MAX,
1068             .default_num = 0,
1069             .text = "Index of the first pane in each window."
1070           },
1071 
1072           { .name = "pane-border-format",
1073             .type = OPTIONS_TABLE_STRING,
1074             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1075             .default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] "
1076                                "\"#{pane_title}\"",
1077             .text = "Format of text in the pane status lines."
1078           },
1079 
1080           { .name = "pane-border-indicators",
1081             .type = OPTIONS_TABLE_CHOICE,
1082             .scope = OPTIONS_TABLE_WINDOW,
1083             .choices = options_table_pane_border_indicators_list,
1084             .default_num = PANE_BORDER_COLOUR,
1085             .text = "Whether to indicate the active pane by colouring border or "
1086                       "displaying arrow markers."
1087           },
1088 
1089           { .name = "pane-border-lines",
1090             .type = OPTIONS_TABLE_CHOICE,
1091             .scope = OPTIONS_TABLE_WINDOW,
1092             .choices = options_table_pane_border_lines_list,
1093             .default_num = PANE_LINES_SINGLE,
1094             .text = "Type of characters used to draw pane border lines. Some of "
1095                       "these are only supported on terminals with UTF-8 support."
1096           },
1097 
1098           { .name = "pane-border-status",
1099             .type = OPTIONS_TABLE_CHOICE,
1100             .scope = OPTIONS_TABLE_WINDOW,
1101             .choices = options_table_pane_status_list,
1102             .default_num = PANE_STATUS_OFF,
1103             .text = "Position of the pane status lines."
1104           },
1105 
1106           { .name = "pane-border-style",
1107             .type = OPTIONS_TABLE_STRING,
1108             .scope = OPTIONS_TABLE_WINDOW,
1109             .default_str = "default",
1110             .flags = OPTIONS_TABLE_IS_STYLE,
1111             .separator = ",",
1112             .text = "Style of the pane status lines."
1113           },
1114 
1115           { .name = "pane-colours",
1116             .type = OPTIONS_TABLE_COLOUR,
1117             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1118             .default_str = "",
1119             .flags = OPTIONS_TABLE_IS_ARRAY,
1120             .text = "The default colour palette for colours zero to 255."
1121           },
1122 
1123           { .name = "popup-style",
1124             .type = OPTIONS_TABLE_STRING,
1125             .scope = OPTIONS_TABLE_WINDOW,
1126             .default_str = "default",
1127             .flags = OPTIONS_TABLE_IS_STYLE,
1128             .separator = ",",
1129             .text = "Default style of popups."
1130           },
1131 
1132           { .name = "popup-border-style",
1133             .type = OPTIONS_TABLE_STRING,
1134             .scope = OPTIONS_TABLE_WINDOW,
1135             .default_str = "default",
1136             .flags = OPTIONS_TABLE_IS_STYLE,
1137             .separator = ",",
1138             .text = "Default style of popup borders."
1139           },
1140 
1141           { .name = "popup-border-lines",
1142             .type = OPTIONS_TABLE_CHOICE,
1143             .scope = OPTIONS_TABLE_WINDOW,
1144             .choices = options_table_popup_border_lines_list,
1145             .default_num = BOX_LINES_SINGLE,
1146             .text = "Type of characters used to draw popup border lines. Some of "
1147                       "these are only supported on terminals with UTF-8 support."
1148           },
1149 
1150           { .name = "remain-on-exit",
1151             .type = OPTIONS_TABLE_CHOICE,
1152             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1153             .choices = options_table_remain_on_exit_list,
1154             .default_num = 0,
1155             .text = "Whether panes should remain ('on') or be automatically "
1156                       "killed ('off' or 'failed') when the program inside exits."
1157           },
1158 
1159           { .name = "remain-on-exit-format",
1160             .type = OPTIONS_TABLE_STRING,
1161             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1162             .default_str = "Pane is dead ("
1163                                "#{?#{!=:#{pane_dead_status},},"
1164                            "status #{pane_dead_status},}"
1165                                "#{?#{!=:#{pane_dead_signal},},"
1166                            "signal #{pane_dead_signal},}, "
1167                                "#{t:pane_dead_time})",
1168             .text = "Message shown after the program in a pane has exited, if "
1169                     "remain-on-exit is enabled."
1170           },
1171 
1172           { .name = "scroll-on-clear",
1173             .type = OPTIONS_TABLE_FLAG,
1174             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1175             .default_num = 1,
1176             .text = "Whether the contents of the screen should be scrolled into"
1177                       "history when clearing the whole screen."
1178           },
1179 
1180           { .name = "synchronize-panes",
1181             .type = OPTIONS_TABLE_FLAG,
1182             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1183             .default_num = 0,
1184             .text = "Whether typing should be sent to all panes simultaneously."
1185           },
1186 
1187           { .name = "window-active-style",
1188             .type = OPTIONS_TABLE_STRING,
1189             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1190             .default_str = "default",
1191             .flags = OPTIONS_TABLE_IS_STYLE,
1192             .separator = ",",
1193             .text = "Default style of the active pane."
1194           },
1195 
1196           { .name = "window-size",
1197             .type = OPTIONS_TABLE_CHOICE,
1198             .scope = OPTIONS_TABLE_WINDOW,
1199             .choices = options_table_window_size_list,
1200             .default_num = WINDOW_SIZE_LATEST,
1201             .text = "How window size is calculated. "
1202                       "'latest' uses the size of the most recently used client, "
1203                       "'largest' the largest client, 'smallest' the smallest "
1204                       "client and 'manual' a size set by the 'resize-window' "
1205                       "command."
1206           },
1207 
1208           { .name = "window-style",
1209             .type = OPTIONS_TABLE_STRING,
1210             .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1211             .default_str = "default",
1212             .flags = OPTIONS_TABLE_IS_STYLE,
1213             .separator = ",",
1214             .text = "Default style of panes that are not the active pane."
1215           },
1216 
1217           { .name = "window-status-activity-style",
1218             .type = OPTIONS_TABLE_STRING,
1219             .scope = OPTIONS_TABLE_WINDOW,
1220             .default_str = "reverse",
1221             .flags = OPTIONS_TABLE_IS_STYLE,
1222             .separator = ",",
1223             .text = "Style of windows in the status line with an activity alert."
1224           },
1225 
1226           { .name = "window-status-bell-style",
1227             .type = OPTIONS_TABLE_STRING,
1228             .scope = OPTIONS_TABLE_WINDOW,
1229             .default_str = "reverse",
1230             .flags = OPTIONS_TABLE_IS_STYLE,
1231             .separator = ",",
1232             .text = "Style of windows in the status line with a bell alert."
1233           },
1234 
1235           { .name = "window-status-current-format",
1236             .type = OPTIONS_TABLE_STRING,
1237             .scope = OPTIONS_TABLE_WINDOW,
1238             .default_str = "#I:#W#{?window_flags,#{window_flags}, }",
1239             .text = "Format of the current window in the status line."
1240           },
1241 
1242           { .name = "window-status-current-style",
1243             .type = OPTIONS_TABLE_STRING,
1244             .scope = OPTIONS_TABLE_WINDOW,
1245             .default_str = "default",
1246             .flags = OPTIONS_TABLE_IS_STYLE,
1247             .separator = ",",
1248             .text = "Style of the current window in the status line."
1249           },
1250 
1251           { .name = "window-status-format",
1252             .type = OPTIONS_TABLE_STRING,
1253             .scope = OPTIONS_TABLE_WINDOW,
1254             .default_str = "#I:#W#{?window_flags,#{window_flags}, }",
1255             .text = "Format of windows in the status line, except the current "
1256                       "window."
1257           },
1258 
1259           { .name = "window-status-last-style",
1260             .type = OPTIONS_TABLE_STRING,
1261             .scope = OPTIONS_TABLE_WINDOW,
1262             .default_str = "default",
1263             .flags = OPTIONS_TABLE_IS_STYLE,
1264             .separator = ",",
1265             .text = "Style of the last window in the status line."
1266           },
1267 
1268           { .name = "window-status-separator",
1269             .type = OPTIONS_TABLE_STRING,
1270             .scope = OPTIONS_TABLE_WINDOW,
1271             .default_str = " ",
1272             .text = "Separator between windows in the status line."
1273           },
1274 
1275           { .name = "window-status-style",
1276             .type = OPTIONS_TABLE_STRING,
1277             .scope = OPTIONS_TABLE_WINDOW,
1278             .default_str = "default",
1279             .flags = OPTIONS_TABLE_IS_STYLE,
1280             .separator = ",",
1281             .text = "Style of windows in the status line, except the current and "
1282                       "last windows."
1283           },
1284 
1285           { .name = "wrap-search",
1286             .type = OPTIONS_TABLE_FLAG,
1287             .scope = OPTIONS_TABLE_WINDOW,
1288             .default_num = 1,
1289             .text = "Whether searching in copy mode should wrap at the top or "
1290                       "bottom."
1291           },
1292 
1293           { .name = "xterm-keys", /* no longer used */
1294             .type = OPTIONS_TABLE_FLAG,
1295             .scope = OPTIONS_TABLE_WINDOW,
1296             .default_num = 1,
1297             .text = "Whether xterm-style function key sequences should be sent. "
1298                       "This option is no longer used."
1299           },
1300 
1301           /* Hook options. */
1302           OPTIONS_TABLE_HOOK("after-bind-key", ""),
1303           OPTIONS_TABLE_HOOK("after-capture-pane", ""),
1304           OPTIONS_TABLE_HOOK("after-copy-mode", ""),
1305           OPTIONS_TABLE_HOOK("after-display-message", ""),
1306           OPTIONS_TABLE_HOOK("after-display-panes", ""),
1307           OPTIONS_TABLE_HOOK("after-kill-pane", ""),
1308           OPTIONS_TABLE_HOOK("after-list-buffers", ""),
1309           OPTIONS_TABLE_HOOK("after-list-clients", ""),
1310           OPTIONS_TABLE_HOOK("after-list-keys", ""),
1311           OPTIONS_TABLE_HOOK("after-list-panes", ""),
1312           OPTIONS_TABLE_HOOK("after-list-sessions", ""),
1313           OPTIONS_TABLE_HOOK("after-list-windows", ""),
1314           OPTIONS_TABLE_HOOK("after-load-buffer", ""),
1315           OPTIONS_TABLE_HOOK("after-lock-server", ""),
1316           OPTIONS_TABLE_HOOK("after-new-session", ""),
1317           OPTIONS_TABLE_HOOK("after-new-window", ""),
1318           OPTIONS_TABLE_HOOK("after-paste-buffer", ""),
1319           OPTIONS_TABLE_HOOK("after-pipe-pane", ""),
1320           OPTIONS_TABLE_HOOK("after-queue", ""),
1321           OPTIONS_TABLE_HOOK("after-refresh-client", ""),
1322           OPTIONS_TABLE_HOOK("after-rename-session", ""),
1323           OPTIONS_TABLE_HOOK("after-rename-window", ""),
1324           OPTIONS_TABLE_HOOK("after-resize-pane", ""),
1325           OPTIONS_TABLE_HOOK("after-resize-window", ""),
1326           OPTIONS_TABLE_HOOK("after-save-buffer", ""),
1327           OPTIONS_TABLE_HOOK("after-select-layout", ""),
1328           OPTIONS_TABLE_HOOK("after-select-pane", ""),
1329           OPTIONS_TABLE_HOOK("after-select-window", ""),
1330           OPTIONS_TABLE_HOOK("after-send-keys", ""),
1331           OPTIONS_TABLE_HOOK("after-set-buffer", ""),
1332           OPTIONS_TABLE_HOOK("after-set-environment", ""),
1333           OPTIONS_TABLE_HOOK("after-set-hook", ""),
1334           OPTIONS_TABLE_HOOK("after-set-option", ""),
1335           OPTIONS_TABLE_HOOK("after-show-environment", ""),
1336           OPTIONS_TABLE_HOOK("after-show-messages", ""),
1337           OPTIONS_TABLE_HOOK("after-show-options", ""),
1338           OPTIONS_TABLE_HOOK("after-split-window", ""),
1339           OPTIONS_TABLE_HOOK("after-unbind-key", ""),
1340           OPTIONS_TABLE_HOOK("alert-activity", ""),
1341           OPTIONS_TABLE_HOOK("alert-bell", ""),
1342           OPTIONS_TABLE_HOOK("alert-silence", ""),
1343           OPTIONS_TABLE_HOOK("client-active", ""),
1344           OPTIONS_TABLE_HOOK("client-attached", ""),
1345           OPTIONS_TABLE_HOOK("client-detached", ""),
1346           OPTIONS_TABLE_HOOK("client-focus-in", ""),
1347           OPTIONS_TABLE_HOOK("client-focus-out", ""),
1348           OPTIONS_TABLE_HOOK("client-resized", ""),
1349           OPTIONS_TABLE_HOOK("client-session-changed", ""),
1350           OPTIONS_TABLE_HOOK("command-error", ""),
1351           OPTIONS_TABLE_PANE_HOOK("pane-died", ""),
1352           OPTIONS_TABLE_PANE_HOOK("pane-exited", ""),
1353           OPTIONS_TABLE_PANE_HOOK("pane-focus-in", ""),
1354           OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""),
1355           OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""),
1356           OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""),
1357           OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""),
1358           OPTIONS_TABLE_HOOK("session-closed", ""),
1359           OPTIONS_TABLE_HOOK("session-created", ""),
1360           OPTIONS_TABLE_HOOK("session-renamed", ""),
1361           OPTIONS_TABLE_HOOK("session-window-changed", ""),
1362           OPTIONS_TABLE_WINDOW_HOOK("window-layout-changed", ""),
1363           OPTIONS_TABLE_HOOK("window-linked", ""),
1364           OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
1365           OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
1366           OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
1367           OPTIONS_TABLE_HOOK("window-unlinked", ""),
1368 
1369           { .name = NULL }
1370 };
1371