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