xref: /openbsd-src/usr.bin/tmux/options-table.c (revision 25c4e8bd056e974b28f4a0ffd39d76c190a56013)
1 /* $OpenBSD: options-table.c,v 1.163 2022/06/14 07:29:00 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 	                 "rxvt*:ignorefkeys",
368 	  .separator = ",",
369 	  .text = "List of terminal features, used if they cannot be "
370 		  "automatically detected."
371 	},
372 
373 	{ .name = "user-keys",
374 	  .type = OPTIONS_TABLE_STRING,
375 	  .scope = OPTIONS_TABLE_SERVER,
376 	  .flags = OPTIONS_TABLE_IS_ARRAY,
377 	  .default_str = "",
378 	  .separator = ",",
379 	  .text = "User key assignments. "
380 		  "Each sequence in the list is translated into a key: "
381 		  "'User0', 'User1' and so on."
382 	},
383 
384 	/* Session options. */
385 	{ .name = "activity-action",
386 	  .type = OPTIONS_TABLE_CHOICE,
387 	  .scope = OPTIONS_TABLE_SESSION,
388 	  .choices = options_table_bell_action_list,
389 	  .default_num = ALERT_OTHER,
390 	  .text = "Action to take on an activity alert."
391 	},
392 
393 	{ .name = "assume-paste-time",
394 	  .type = OPTIONS_TABLE_NUMBER,
395 	  .scope = OPTIONS_TABLE_SESSION,
396 	  .minimum = 0,
397 	  .maximum = INT_MAX,
398 	  .default_num = 1,
399 	  .unit = "milliseconds",
400 	  .text = "Maximum time between input to assume it is pasting rather "
401 		  "than typing."
402 	},
403 
404 	{ .name = "base-index",
405 	  .type = OPTIONS_TABLE_NUMBER,
406 	  .scope = OPTIONS_TABLE_SESSION,
407 	  .minimum = 0,
408 	  .maximum = INT_MAX,
409 	  .default_num = 0,
410 	  .text = "Default index of the first window in each session."
411 	},
412 
413 	{ .name = "bell-action",
414 	  .type = OPTIONS_TABLE_CHOICE,
415 	  .scope = OPTIONS_TABLE_SESSION,
416 	  .choices = options_table_bell_action_list,
417 	  .default_num = ALERT_ANY,
418 	  .text = "Action to take on a bell alert."
419 	},
420 
421 	{ .name = "default-command",
422 	  .type = OPTIONS_TABLE_STRING,
423 	  .scope = OPTIONS_TABLE_SESSION,
424 	  .default_str = "",
425 	  .text = "Default command to run in new panes. If empty, a shell is "
426 		  "started."
427 	},
428 
429 	{ .name = "default-shell",
430 	  .type = OPTIONS_TABLE_STRING,
431 	  .scope = OPTIONS_TABLE_SESSION,
432 	  .default_str = _PATH_BSHELL,
433 	  .text = "Location of default shell."
434 	},
435 
436 	{ .name = "default-size",
437 	  .type = OPTIONS_TABLE_STRING,
438 	  .scope = OPTIONS_TABLE_SESSION,
439 	  .pattern = "[0-9]*x[0-9]*",
440 	  .default_str = "80x24",
441 	  .text = "Initial size of new sessions."
442 	},
443 
444 	{ .name = "destroy-unattached",
445 	  .type = OPTIONS_TABLE_FLAG,
446 	  .scope = OPTIONS_TABLE_SESSION,
447 	  .default_num = 0,
448 	  .text = "Whether to destroy sessions when they have no attached "
449 		  "clients."
450 	},
451 
452 	{ .name = "detach-on-destroy",
453 	  .type = OPTIONS_TABLE_CHOICE,
454 	  .scope = OPTIONS_TABLE_SESSION,
455 	  .choices = options_table_detach_on_destroy_list,
456 	  .default_num = 1,
457 	  .text = "Whether to detach when a session is destroyed, or switch "
458 		  "the client to another session if any exist."
459 	},
460 
461 	{ .name = "display-panes-active-colour",
462 	  .type = OPTIONS_TABLE_COLOUR,
463 	  .scope = OPTIONS_TABLE_SESSION,
464 	  .default_num = 1,
465 	  .text = "Colour of the active pane for 'display-panes'."
466 	},
467 
468 	{ .name = "display-panes-colour",
469 	  .type = OPTIONS_TABLE_COLOUR,
470 	  .scope = OPTIONS_TABLE_SESSION,
471 	  .default_num = 4,
472 	  .text = "Colour of not active panes for 'display-panes'."
473 	},
474 
475 	{ .name = "display-panes-time",
476 	  .type = OPTIONS_TABLE_NUMBER,
477 	  .scope = OPTIONS_TABLE_SESSION,
478 	  .minimum = 1,
479 	  .maximum = INT_MAX,
480 	  .default_num = 1000,
481 	  .unit = "milliseconds",
482 	  .text = "Time for which 'display-panes' should show pane numbers."
483 	},
484 
485 	{ .name = "display-time",
486 	  .type = OPTIONS_TABLE_NUMBER,
487 	  .scope = OPTIONS_TABLE_SESSION,
488 	  .minimum = 0,
489 	  .maximum = INT_MAX,
490 	  .default_num = 750,
491 	  .unit = "milliseconds",
492 	  .text = "Time for which status line messages should appear."
493 	},
494 
495 	{ .name = "history-limit",
496 	  .type = OPTIONS_TABLE_NUMBER,
497 	  .scope = OPTIONS_TABLE_SESSION,
498 	  .minimum = 0,
499 	  .maximum = INT_MAX,
500 	  .default_num = 2000,
501 	  .unit = "lines",
502 	  .text = "Maximum number of lines to keep in the history for each "
503 		  "pane. "
504 		  "If changed, the new value applies only to new panes."
505 	},
506 
507 	{ .name = "key-table",
508 	  .type = OPTIONS_TABLE_STRING,
509 	  .scope = OPTIONS_TABLE_SESSION,
510 	  .default_str = "root",
511 	  .text = "Default key table. "
512 		  "Key presses are first looked up in this table."
513 	},
514 
515 	{ .name = "lock-after-time",
516 	  .type = OPTIONS_TABLE_NUMBER,
517 	  .scope = OPTIONS_TABLE_SESSION,
518 	  .minimum = 0,
519 	  .maximum = INT_MAX,
520 	  .default_num = 0,
521 	  .unit = "seconds",
522 	  .text = "Time after which a client is locked if not used."
523 	},
524 
525 	{ .name = "lock-command",
526 	  .type = OPTIONS_TABLE_STRING,
527 	  .scope = OPTIONS_TABLE_SESSION,
528 	  .default_str = "lock -np",
529 	  .text = "Shell command to run to lock a client."
530 	},
531 
532 	{ .name = "message-command-style",
533 	  .type = OPTIONS_TABLE_STRING,
534 	  .scope = OPTIONS_TABLE_SESSION,
535 	  .default_str = "bg=black,fg=yellow",
536 	  .flags = OPTIONS_TABLE_IS_STYLE,
537 	  .separator = ",",
538 	  .text = "Style of the command prompt when in command mode, if "
539 		  "'mode-keys' is set to 'vi'."
540 	},
541 
542 	{ .name = "message-style",
543 	  .type = OPTIONS_TABLE_STRING,
544 	  .scope = OPTIONS_TABLE_SESSION,
545 	  .default_str = "bg=yellow,fg=black",
546 	  .flags = OPTIONS_TABLE_IS_STYLE,
547 	  .separator = ",",
548 	  .text = "Style of the command prompt."
549 	},
550 
551 	{ .name = "mouse",
552 	  .type = OPTIONS_TABLE_FLAG,
553 	  .scope = OPTIONS_TABLE_SESSION,
554 	  .default_num = 0,
555 	  .text = "Whether the mouse is recognised and mouse key bindings are "
556 		  "executed. "
557 		  "Applications inside panes can use the mouse even when 'off'."
558 	},
559 
560 	{ .name = "prefix",
561 	  .type = OPTIONS_TABLE_KEY,
562 	  .scope = OPTIONS_TABLE_SESSION,
563 	  .default_num = '\002',
564 	  .text = "The prefix key."
565 	},
566 
567 	{ .name = "prefix2",
568 	  .type = OPTIONS_TABLE_KEY,
569 	  .scope = OPTIONS_TABLE_SESSION,
570 	  .default_num = KEYC_NONE,
571 	  .text = "A second prefix key."
572 	},
573 
574 	{ .name = "renumber-windows",
575 	  .type = OPTIONS_TABLE_FLAG,
576 	  .scope = OPTIONS_TABLE_SESSION,
577 	  .default_num = 0,
578 	  .text = "Whether windows are automatically renumbered rather than "
579 		  "leaving gaps."
580 	},
581 
582 	{ .name = "repeat-time",
583 	  .type = OPTIONS_TABLE_NUMBER,
584 	  .scope = OPTIONS_TABLE_SESSION,
585 	  .minimum = 0,
586 	  .maximum = SHRT_MAX,
587 	  .default_num = 500,
588 	  .unit = "milliseconds",
589 	  .text = "Time to wait for a key binding to repeat, if it is bound "
590 		  "with the '-r' flag."
591 	},
592 
593 	{ .name = "set-titles",
594 	  .type = OPTIONS_TABLE_FLAG,
595 	  .scope = OPTIONS_TABLE_SESSION,
596 	  .default_num = 0,
597 	  .text = "Whether to set the terminal title, if supported."
598 	},
599 
600 	{ .name = "set-titles-string",
601 	  .type = OPTIONS_TABLE_STRING,
602 	  .scope = OPTIONS_TABLE_SESSION,
603 	  .default_str = "#S:#I:#W - \"#T\" #{session_alerts}",
604 	  .text = "Format of the terminal title to set."
605 	},
606 
607 	{ .name = "silence-action",
608 	  .type = OPTIONS_TABLE_CHOICE,
609 	  .scope = OPTIONS_TABLE_SESSION,
610 	  .choices = options_table_bell_action_list,
611 	  .default_num = ALERT_OTHER,
612 	  .text = "Action to take on a silence alert."
613 	},
614 
615 	{ .name = "status",
616 	  .type = OPTIONS_TABLE_CHOICE,
617 	  .scope = OPTIONS_TABLE_SESSION,
618 	  .choices = options_table_status_list,
619 	  .default_num = 1,
620 	  .text = "Number of lines in the status line."
621 	},
622 
623 	{ .name = "status-bg",
624 	  .type = OPTIONS_TABLE_COLOUR,
625 	  .scope = OPTIONS_TABLE_SESSION,
626 	  .default_num = 8,
627 	  .text = "Background colour of the status line. This option is "
628 		  "deprecated, use 'status-style' instead."
629 	},
630 
631 	{ .name = "status-fg",
632 	  .type = OPTIONS_TABLE_COLOUR,
633 	  .scope = OPTIONS_TABLE_SESSION,
634 	  .default_num = 8,
635 	  .text = "Foreground colour of the status line. This option is "
636 		  "deprecated, use 'status-style' instead."
637 	},
638 
639 	{ .name = "status-format",
640 	  .type = OPTIONS_TABLE_STRING,
641 	  .scope = OPTIONS_TABLE_SESSION,
642 	  .flags = OPTIONS_TABLE_IS_ARRAY,
643 	  .default_arr = options_table_status_format_default,
644 	  .text = "Formats for the status lines. "
645 		  "Each array member is the format for one status line. "
646 		  "The default status line is made up of several components "
647 		  "which may be configured individually with other options such "
648 		  "as 'status-left'."
649 	},
650 
651 	{ .name = "status-interval",
652 	  .type = OPTIONS_TABLE_NUMBER,
653 	  .scope = OPTIONS_TABLE_SESSION,
654 	  .minimum = 0,
655 	  .maximum = INT_MAX,
656 	  .default_num = 15,
657 	  .unit = "seconds",
658 	  .text = "Number of seconds between status line updates."
659 	},
660 
661 	{ .name = "status-justify",
662 	  .type = OPTIONS_TABLE_CHOICE,
663 	  .scope = OPTIONS_TABLE_SESSION,
664 	  .choices = options_table_status_justify_list,
665 	  .default_num = 0,
666 	  .text = "Position of the window list in the status line."
667 	},
668 
669 	{ .name = "status-keys",
670 	  .type = OPTIONS_TABLE_CHOICE,
671 	  .scope = OPTIONS_TABLE_SESSION,
672 	  .choices = options_table_status_keys_list,
673 	  .default_num = MODEKEY_EMACS,
674 	  .text = "Key set to use at the command prompt."
675 	},
676 
677 	{ .name = "status-left",
678 	  .type = OPTIONS_TABLE_STRING,
679 	  .scope = OPTIONS_TABLE_SESSION,
680 	  .default_str = "[#{session_name}] ",
681 	  .text = "Contents of the left side of the status line."
682 	},
683 
684 	{ .name = "status-left-length",
685 	  .type = OPTIONS_TABLE_NUMBER,
686 	  .scope = OPTIONS_TABLE_SESSION,
687 	  .minimum = 0,
688 	  .maximum = SHRT_MAX,
689 	  .default_num = 10,
690 	  .text = "Maximum width of the left side of the status line."
691 	},
692 
693 	{ .name = "status-left-style",
694 	  .type = OPTIONS_TABLE_STRING,
695 	  .scope = OPTIONS_TABLE_SESSION,
696 	  .default_str = "default",
697 	  .flags = OPTIONS_TABLE_IS_STYLE,
698 	  .separator = ",",
699 	  .text = "Style of the left side of the status line."
700 	},
701 
702 	{ .name = "status-position",
703 	  .type = OPTIONS_TABLE_CHOICE,
704 	  .scope = OPTIONS_TABLE_SESSION,
705 	  .choices = options_table_status_position_list,
706 	  .default_num = 1,
707 	  .text = "Position of the status line."
708 	},
709 
710 	{ .name = "status-right",
711 	  .type = OPTIONS_TABLE_STRING,
712 	  .scope = OPTIONS_TABLE_SESSION,
713 	  .default_str = "#{?window_bigger,"
714 			 "[#{window_offset_x}#,#{window_offset_y}] ,}"
715 			 "\"#{=21:pane_title}\" %H:%M %d-%b-%y",
716 	  .text = "Contents of the right side of the status line."
717 
718 	},
719 
720 	{ .name = "status-right-length",
721 	  .type = OPTIONS_TABLE_NUMBER,
722 	  .scope = OPTIONS_TABLE_SESSION,
723 	  .minimum = 0,
724 	  .maximum = SHRT_MAX,
725 	  .default_num = 40,
726 	  .text = "Maximum width of the right side of the status line."
727 	},
728 
729 	{ .name = "status-right-style",
730 	  .type = OPTIONS_TABLE_STRING,
731 	  .scope = OPTIONS_TABLE_SESSION,
732 	  .default_str = "default",
733 	  .flags = OPTIONS_TABLE_IS_STYLE,
734 	  .separator = ",",
735 	  .text = "Style of the right side of the status line."
736 	},
737 
738 	{ .name = "status-style",
739 	  .type = OPTIONS_TABLE_STRING,
740 	  .scope = OPTIONS_TABLE_SESSION,
741 	  .default_str = "bg=green,fg=black",
742 	  .flags = OPTIONS_TABLE_IS_STYLE,
743 	  .separator = ",",
744 	  .text = "Style of the status line."
745 	},
746 
747 	{ .name = "update-environment",
748 	  .type = OPTIONS_TABLE_STRING,
749 	  .scope = OPTIONS_TABLE_SESSION,
750 	  .flags = OPTIONS_TABLE_IS_ARRAY,
751 	  .default_str = "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
752 			 "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY",
753 	  .text = "List of environment variables to update in the session "
754 		  "environment when a client is attached."
755 	},
756 
757 	{ .name = "visual-activity",
758 	  .type = OPTIONS_TABLE_CHOICE,
759 	  .scope = OPTIONS_TABLE_SESSION,
760 	  .choices = options_table_visual_bell_list,
761 	  .default_num = VISUAL_OFF,
762 	  .text = "How activity alerts should be shown: a message ('on'), "
763 		  "a message and a bell ('both') or nothing ('off')."
764 	},
765 
766 	{ .name = "visual-bell",
767 	  .type = OPTIONS_TABLE_CHOICE,
768 	  .scope = OPTIONS_TABLE_SESSION,
769 	  .choices = options_table_visual_bell_list,
770 	  .default_num = VISUAL_OFF,
771 	  .text = "How bell alerts should be shown: a message ('on'), "
772 		  "a message and a bell ('both') or nothing ('off')."
773 	},
774 
775 	{ .name = "visual-silence",
776 	  .type = OPTIONS_TABLE_CHOICE,
777 	  .scope = OPTIONS_TABLE_SESSION,
778 	  .choices = options_table_visual_bell_list,
779 	  .default_num = VISUAL_OFF,
780 	  .text = "How silence alerts should be shown: a message ('on'), "
781 		  "a message and a bell ('both') or nothing ('off')."
782 	},
783 
784 	{ .name = "word-separators",
785 	  .type = OPTIONS_TABLE_STRING,
786 	  .scope = OPTIONS_TABLE_SESSION,
787 	  /*
788 	   * The set of non-alphanumeric printable ASCII characters minus the
789 	   * underscore.
790 	   */
791 	  .default_str = "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",
792 	  .text = "Characters considered to separate words."
793 	},
794 
795 	/* Window options. */
796 	{ .name = "aggressive-resize",
797 	  .type = OPTIONS_TABLE_FLAG,
798 	  .scope = OPTIONS_TABLE_WINDOW,
799 	  .default_num = 0,
800 	  .text = "When 'window-size' is 'smallest', whether the maximum size "
801 		  "of a window is the smallest attached session where it is "
802 		  "the current window ('on') or the smallest session it is "
803 		  "linked to ('off')."
804 	},
805 
806 	{ .name = "allow-passthrough",
807 	  .type = OPTIONS_TABLE_FLAG,
808 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
809 	  .default_num = 0,
810 	  .text = "Whether applications are allowed to use the escape sequence "
811 	          "to bypass tmux."
812 	},
813 
814 	{ .name = "allow-rename",
815 	  .type = OPTIONS_TABLE_FLAG,
816 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
817 	  .default_num = 0,
818 	  .text = "Whether applications are allowed to use the escape sequence "
819 		  "to rename windows."
820 	},
821 
822 	{ .name = "alternate-screen",
823 	  .type = OPTIONS_TABLE_FLAG,
824 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
825 	  .default_num = 1,
826 	  .text = "Whether applications are allowed to use the alternate "
827 		  "screen."
828 	},
829 
830 	{ .name = "automatic-rename",
831 	  .type = OPTIONS_TABLE_FLAG,
832 	  .scope = OPTIONS_TABLE_WINDOW,
833 	  .default_num = 1,
834 	  .text = "Whether windows are automatically renamed."
835 	},
836 
837 	{ .name = "automatic-rename-format",
838 	  .type = OPTIONS_TABLE_STRING,
839 	  .scope = OPTIONS_TABLE_WINDOW,
840 	  .default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}"
841 			 "#{?pane_dead,[dead],}",
842 	  .text = "Format used to automatically rename windows."
843 	},
844 
845 	{ .name = "clock-mode-colour",
846 	  .type = OPTIONS_TABLE_COLOUR,
847 	  .scope = OPTIONS_TABLE_WINDOW,
848 	  .default_num = 4,
849 	  .text = "Colour of the clock in clock mode."
850 	},
851 
852 	{ .name = "clock-mode-style",
853 	  .type = OPTIONS_TABLE_CHOICE,
854 	  .scope = OPTIONS_TABLE_WINDOW,
855 	  .choices = options_table_clock_mode_style_list,
856 	  .default_num = 1,
857 	  .text = "Time format of the clock in clock mode."
858 	},
859 
860 	{ .name = "copy-mode-match-style",
861 	  .type = OPTIONS_TABLE_STRING,
862 	  .scope = OPTIONS_TABLE_WINDOW,
863 	  .default_str = "bg=cyan,fg=black",
864 	  .flags = OPTIONS_TABLE_IS_STYLE,
865 	  .separator = ",",
866 	  .text = "Style of search matches in copy mode."
867 	},
868 
869 	{ .name = "copy-mode-current-match-style",
870 	  .type = OPTIONS_TABLE_STRING,
871 	  .scope = OPTIONS_TABLE_WINDOW,
872 	  .default_str = "bg=magenta,fg=black",
873 	  .flags = OPTIONS_TABLE_IS_STYLE,
874 	  .separator = ",",
875 	  .text = "Style of the current search match in copy mode."
876 	},
877 
878 	{ .name = "copy-mode-mark-style",
879 	  .type = OPTIONS_TABLE_STRING,
880 	  .scope = OPTIONS_TABLE_WINDOW,
881 	  .default_str = "bg=red,fg=black",
882 	  .flags = OPTIONS_TABLE_IS_STYLE,
883 	  .separator = ",",
884 	  .text = "Style of the marked line in copy mode."
885 	},
886 
887 	{ .name = "fill-character",
888 	  .type = OPTIONS_TABLE_STRING,
889 	  .scope = OPTIONS_TABLE_WINDOW,
890 	  .default_str = "",
891 	  .text = "Character used to fill unused parts of window."
892 	},
893 
894 	{ .name = "main-pane-height",
895 	  .type = OPTIONS_TABLE_STRING,
896 	  .scope = OPTIONS_TABLE_WINDOW,
897 	  .default_str = "24",
898 	  .text = "Height of the main pane in the 'main-horizontal' layout. "
899 		  "This may be a percentage, for example '10%'."
900 	},
901 
902 	{ .name = "main-pane-width",
903 	  .type = OPTIONS_TABLE_STRING,
904 	  .scope = OPTIONS_TABLE_WINDOW,
905 	  .default_str = "80",
906 	  .text = "Width of the main pane in the 'main-vertical' layout. "
907 		  "This may be a percentage, for example '10%'."
908 	},
909 
910 	{ .name = "mode-keys",
911 	  .type = OPTIONS_TABLE_CHOICE,
912 	  .scope = OPTIONS_TABLE_WINDOW,
913 	  .choices = options_table_mode_keys_list,
914 	  .default_num = MODEKEY_EMACS,
915 	  .text = "Key set used in copy mode."
916 	},
917 
918 	{ .name = "mode-style",
919 	  .type = OPTIONS_TABLE_STRING,
920 	  .scope = OPTIONS_TABLE_WINDOW,
921 	  .default_str = "bg=yellow,fg=black",
922 	  .flags = OPTIONS_TABLE_IS_STYLE,
923 	  .separator = ",",
924 	  .text = "Style of indicators and highlighting in modes."
925 	},
926 
927 	{ .name = "monitor-activity",
928 	  .type = OPTIONS_TABLE_FLAG,
929 	  .scope = OPTIONS_TABLE_WINDOW,
930 	  .default_num = 0,
931 	  .text = "Whether an alert is triggered by activity."
932 	},
933 
934 	{ .name = "monitor-bell",
935 	  .type = OPTIONS_TABLE_FLAG,
936 	  .scope = OPTIONS_TABLE_WINDOW,
937 	  .default_num = 1,
938 	  .text = "Whether an alert is triggered by a bell."
939 	},
940 
941 	{ .name = "monitor-silence",
942 	  .type = OPTIONS_TABLE_NUMBER,
943 	  .scope = OPTIONS_TABLE_WINDOW,
944 	  .minimum = 0,
945 	  .maximum = INT_MAX,
946 	  .default_num = 0,
947 	  .text = "Time after which an alert is triggered by silence. "
948 		  "Zero means no alert."
949 
950 	},
951 
952 	{ .name = "other-pane-height",
953 	  .type = OPTIONS_TABLE_STRING,
954 	  .scope = OPTIONS_TABLE_WINDOW,
955 	  .default_str = "0",
956 	  .text = "Height of the other panes in the 'main-horizontal' layout. "
957 		  "This may be a percentage, for example '10%'."
958 	},
959 
960 	{ .name = "other-pane-width",
961 	  .type = OPTIONS_TABLE_STRING,
962 	  .scope = OPTIONS_TABLE_WINDOW,
963 	  .default_str = "0",
964 	  .text = "Height of the other panes in the 'main-vertical' layout. "
965 		  "This may be a percentage, for example '10%'."
966 	},
967 
968 	{ .name = "pane-active-border-style",
969 	  .type = OPTIONS_TABLE_STRING,
970 	  .scope = OPTIONS_TABLE_WINDOW,
971 	  .default_str = "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}",
972 	  .flags = OPTIONS_TABLE_IS_STYLE,
973 	  .separator = ",",
974 	  .text = "Style of the active pane border."
975 	},
976 
977 	{ .name = "pane-base-index",
978 	  .type = OPTIONS_TABLE_NUMBER,
979 	  .scope = OPTIONS_TABLE_WINDOW,
980 	  .minimum = 0,
981 	  .maximum = USHRT_MAX,
982 	  .default_num = 0,
983 	  .text = "Index of the first pane in each window."
984 	},
985 
986 	{ .name = "pane-border-format",
987 	  .type = OPTIONS_TABLE_STRING,
988 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
989 	  .default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] "
990 			 "\"#{pane_title}\"",
991 	  .text = "Format of text in the pane status lines."
992 	},
993 
994 	{ .name = "pane-border-indicators",
995 	  .type = OPTIONS_TABLE_CHOICE,
996 	  .scope = OPTIONS_TABLE_WINDOW,
997 	  .choices = options_table_pane_border_indicators_list,
998 	  .default_num = PANE_BORDER_COLOUR,
999 	  .text = "Whether to indicate the active pane by colouring border or "
1000 		  "displaying arrow markers."
1001 	},
1002 
1003 	{ .name = "pane-border-lines",
1004 	  .type = OPTIONS_TABLE_CHOICE,
1005 	  .scope = OPTIONS_TABLE_WINDOW,
1006 	  .choices = options_table_pane_border_lines_list,
1007 	  .default_num = PANE_LINES_SINGLE,
1008 	  .text = "Type of characters used to draw pane border lines. Some of "
1009 		  "these are only supported on terminals with UTF-8 support."
1010 	},
1011 
1012 	{ .name = "pane-border-status",
1013 	  .type = OPTIONS_TABLE_CHOICE,
1014 	  .scope = OPTIONS_TABLE_WINDOW,
1015 	  .choices = options_table_pane_status_list,
1016 	  .default_num = PANE_STATUS_OFF,
1017 	  .text = "Position of the pane status lines."
1018 	},
1019 
1020 	{ .name = "pane-border-style",
1021 	  .type = OPTIONS_TABLE_STRING,
1022 	  .scope = OPTIONS_TABLE_WINDOW,
1023 	  .default_str = "default",
1024 	  .flags = OPTIONS_TABLE_IS_STYLE,
1025 	  .separator = ",",
1026 	  .text = "Style of the pane status lines."
1027 	},
1028 
1029 	{ .name = "pane-colours",
1030 	  .type = OPTIONS_TABLE_COLOUR,
1031 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1032 	  .default_str = "",
1033 	  .flags = OPTIONS_TABLE_IS_ARRAY,
1034 	  .text = "The default colour palette for colours zero to 255."
1035 	},
1036 
1037 	{ .name = "popup-style",
1038 	  .type = OPTIONS_TABLE_STRING,
1039 	  .scope = OPTIONS_TABLE_WINDOW,
1040 	  .default_str = "default",
1041 	  .flags = OPTIONS_TABLE_IS_STYLE,
1042 	  .separator = ",",
1043 	  .text = "Default style of popups."
1044 	},
1045 
1046 	{ .name = "popup-border-style",
1047 	  .type = OPTIONS_TABLE_STRING,
1048 	  .scope = OPTIONS_TABLE_WINDOW,
1049 	  .default_str = "default",
1050 	  .flags = OPTIONS_TABLE_IS_STYLE,
1051 	  .separator = ",",
1052 	  .text = "Default style of popup borders."
1053 	},
1054 
1055 	{ .name = "popup-border-lines",
1056 	  .type = OPTIONS_TABLE_CHOICE,
1057 	  .scope = OPTIONS_TABLE_WINDOW,
1058 	  .choices = options_table_popup_border_lines_list,
1059 	  .default_num = BOX_LINES_SINGLE,
1060 	  .text = "Type of characters used to draw popup border lines. Some of "
1061 		  "these are only supported on terminals with UTF-8 support."
1062 	},
1063 
1064 	{ .name = "remain-on-exit",
1065 	  .type = OPTIONS_TABLE_CHOICE,
1066 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1067 	  .choices = options_table_remain_on_exit_list,
1068 	  .default_num = 0,
1069 	  .text = "Whether panes should remain ('on') or be automatically "
1070 		  "killed ('off' or 'failed') when the program inside exits."
1071 	},
1072 
1073 	{ .name = "remain-on-exit-format",
1074 	  .type = OPTIONS_TABLE_STRING,
1075 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1076 	  .default_str = "Pane is dead ("
1077 			 "#{?#{!=:#{pane_dead_status},},"
1078 	                 "status #{pane_dead_status},}"
1079 			 "#{?#{!=:#{pane_dead_signal},},"
1080 	                 "signal #{pane_dead_signal},}, "
1081 			 "#{t:pane_dead_time})",
1082 	  .text = "Message shown after the program in a pane has exited, if "
1083 	          "remain-on-exit is enabled."
1084 	},
1085 
1086 	{ .name = "scroll-on-clear",
1087 	  .type = OPTIONS_TABLE_FLAG,
1088 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1089 	  .default_num = 1,
1090 	  .text = "Whether the contents of the screen should be scrolled into"
1091 		  "history when clearing the whole screen."
1092 	},
1093 
1094 	{ .name = "synchronize-panes",
1095 	  .type = OPTIONS_TABLE_FLAG,
1096 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1097 	  .default_num = 0,
1098 	  .text = "Whether typing should be sent to all panes simultaneously."
1099 	},
1100 
1101 	{ .name = "window-active-style",
1102 	  .type = OPTIONS_TABLE_STRING,
1103 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1104 	  .default_str = "default",
1105 	  .flags = OPTIONS_TABLE_IS_STYLE,
1106 	  .separator = ",",
1107 	  .text = "Default style of the active pane."
1108 	},
1109 
1110 	{ .name = "window-size",
1111 	  .type = OPTIONS_TABLE_CHOICE,
1112 	  .scope = OPTIONS_TABLE_WINDOW,
1113 	  .choices = options_table_window_size_list,
1114 	  .default_num = WINDOW_SIZE_LATEST,
1115 	  .text = "How window size is calculated. "
1116 		  "'latest' uses the size of the most recently used client, "
1117 		  "'largest' the largest client, 'smallest' the smallest "
1118 		  "client and 'manual' a size set by the 'resize-window' "
1119 		  "command."
1120 	},
1121 
1122 	{ .name = "window-style",
1123 	  .type = OPTIONS_TABLE_STRING,
1124 	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1125 	  .default_str = "default",
1126 	  .flags = OPTIONS_TABLE_IS_STYLE,
1127 	  .separator = ",",
1128 	  .text = "Default style of panes that are not the active pane."
1129 	},
1130 
1131 	{ .name = "window-status-activity-style",
1132 	  .type = OPTIONS_TABLE_STRING,
1133 	  .scope = OPTIONS_TABLE_WINDOW,
1134 	  .default_str = "reverse",
1135 	  .flags = OPTIONS_TABLE_IS_STYLE,
1136 	  .separator = ",",
1137 	  .text = "Style of windows in the status line with an activity alert."
1138 	},
1139 
1140 	{ .name = "window-status-bell-style",
1141 	  .type = OPTIONS_TABLE_STRING,
1142 	  .scope = OPTIONS_TABLE_WINDOW,
1143 	  .default_str = "reverse",
1144 	  .flags = OPTIONS_TABLE_IS_STYLE,
1145 	  .separator = ",",
1146 	  .text = "Style of windows in the status line with a bell alert."
1147 	},
1148 
1149 	{ .name = "window-status-current-format",
1150 	  .type = OPTIONS_TABLE_STRING,
1151 	  .scope = OPTIONS_TABLE_WINDOW,
1152 	  .default_str = "#I:#W#{?window_flags,#{window_flags}, }",
1153 	  .text = "Format of the current window in the status line."
1154 	},
1155 
1156 	{ .name = "window-status-current-style",
1157 	  .type = OPTIONS_TABLE_STRING,
1158 	  .scope = OPTIONS_TABLE_WINDOW,
1159 	  .default_str = "default",
1160 	  .flags = OPTIONS_TABLE_IS_STYLE,
1161 	  .separator = ",",
1162 	  .text = "Style of the current window in the status line."
1163 	},
1164 
1165 	{ .name = "window-status-format",
1166 	  .type = OPTIONS_TABLE_STRING,
1167 	  .scope = OPTIONS_TABLE_WINDOW,
1168 	  .default_str = "#I:#W#{?window_flags,#{window_flags}, }",
1169 	  .text = "Format of windows in the status line, except the current "
1170 		  "window."
1171 	},
1172 
1173 	{ .name = "window-status-last-style",
1174 	  .type = OPTIONS_TABLE_STRING,
1175 	  .scope = OPTIONS_TABLE_WINDOW,
1176 	  .default_str = "default",
1177 	  .flags = OPTIONS_TABLE_IS_STYLE,
1178 	  .separator = ",",
1179 	  .text = "Style of the last window in the status line."
1180 	},
1181 
1182 	{ .name = "window-status-separator",
1183 	  .type = OPTIONS_TABLE_STRING,
1184 	  .scope = OPTIONS_TABLE_WINDOW,
1185 	  .default_str = " ",
1186 	  .text = "Separator between windows in the status line."
1187 	},
1188 
1189 	{ .name = "window-status-style",
1190 	  .type = OPTIONS_TABLE_STRING,
1191 	  .scope = OPTIONS_TABLE_WINDOW,
1192 	  .default_str = "default",
1193 	  .flags = OPTIONS_TABLE_IS_STYLE,
1194 	  .separator = ",",
1195 	  .text = "Style of windows in the status line, except the current and "
1196 		  "last windows."
1197 	},
1198 
1199 	{ .name = "wrap-search",
1200 	  .type = OPTIONS_TABLE_FLAG,
1201 	  .scope = OPTIONS_TABLE_WINDOW,
1202 	  .default_num = 1,
1203 	  .text = "Whether searching in copy mode should wrap at the top or "
1204 		  "bottom."
1205 	},
1206 
1207 	{ .name = "xterm-keys", /* no longer used */
1208 	  .type = OPTIONS_TABLE_FLAG,
1209 	  .scope = OPTIONS_TABLE_WINDOW,
1210 	  .default_num = 1,
1211 	  .text = "Whether xterm-style function key sequences should be sent. "
1212 		  "This option is no longer used."
1213 	},
1214 
1215 	/* Hook options. */
1216 	OPTIONS_TABLE_HOOK("after-bind-key", ""),
1217 	OPTIONS_TABLE_HOOK("after-capture-pane", ""),
1218 	OPTIONS_TABLE_HOOK("after-copy-mode", ""),
1219 	OPTIONS_TABLE_HOOK("after-display-message", ""),
1220 	OPTIONS_TABLE_HOOK("after-display-panes", ""),
1221 	OPTIONS_TABLE_HOOK("after-kill-pane", ""),
1222 	OPTIONS_TABLE_HOOK("after-list-buffers", ""),
1223 	OPTIONS_TABLE_HOOK("after-list-clients", ""),
1224 	OPTIONS_TABLE_HOOK("after-list-keys", ""),
1225 	OPTIONS_TABLE_HOOK("after-list-panes", ""),
1226 	OPTIONS_TABLE_HOOK("after-list-sessions", ""),
1227 	OPTIONS_TABLE_HOOK("after-list-windows", ""),
1228 	OPTIONS_TABLE_HOOK("after-load-buffer", ""),
1229 	OPTIONS_TABLE_HOOK("after-lock-server", ""),
1230 	OPTIONS_TABLE_HOOK("after-new-session", ""),
1231 	OPTIONS_TABLE_HOOK("after-new-window", ""),
1232 	OPTIONS_TABLE_HOOK("after-paste-buffer", ""),
1233 	OPTIONS_TABLE_HOOK("after-pipe-pane", ""),
1234 	OPTIONS_TABLE_HOOK("after-queue", ""),
1235 	OPTIONS_TABLE_HOOK("after-refresh-client", ""),
1236 	OPTIONS_TABLE_HOOK("after-rename-session", ""),
1237 	OPTIONS_TABLE_HOOK("after-rename-window", ""),
1238 	OPTIONS_TABLE_HOOK("after-resize-pane", ""),
1239 	OPTIONS_TABLE_HOOK("after-resize-window", ""),
1240 	OPTIONS_TABLE_HOOK("after-save-buffer", ""),
1241 	OPTIONS_TABLE_HOOK("after-select-layout", ""),
1242 	OPTIONS_TABLE_HOOK("after-select-pane", ""),
1243 	OPTIONS_TABLE_HOOK("after-select-window", ""),
1244 	OPTIONS_TABLE_HOOK("after-send-keys", ""),
1245 	OPTIONS_TABLE_HOOK("after-set-buffer", ""),
1246 	OPTIONS_TABLE_HOOK("after-set-environment", ""),
1247 	OPTIONS_TABLE_HOOK("after-set-hook", ""),
1248 	OPTIONS_TABLE_HOOK("after-set-option", ""),
1249 	OPTIONS_TABLE_HOOK("after-show-environment", ""),
1250 	OPTIONS_TABLE_HOOK("after-show-messages", ""),
1251 	OPTIONS_TABLE_HOOK("after-show-options", ""),
1252 	OPTIONS_TABLE_HOOK("after-split-window", ""),
1253 	OPTIONS_TABLE_HOOK("after-unbind-key", ""),
1254 	OPTIONS_TABLE_HOOK("alert-activity", ""),
1255 	OPTIONS_TABLE_HOOK("alert-bell", ""),
1256 	OPTIONS_TABLE_HOOK("alert-silence", ""),
1257 	OPTIONS_TABLE_HOOK("client-active", ""),
1258 	OPTIONS_TABLE_HOOK("client-attached", ""),
1259 	OPTIONS_TABLE_HOOK("client-detached", ""),
1260 	OPTIONS_TABLE_HOOK("client-focus-in", ""),
1261 	OPTIONS_TABLE_HOOK("client-focus-out", ""),
1262 	OPTIONS_TABLE_HOOK("client-resized", ""),
1263 	OPTIONS_TABLE_HOOK("client-session-changed", ""),
1264 	OPTIONS_TABLE_PANE_HOOK("pane-died", ""),
1265 	OPTIONS_TABLE_PANE_HOOK("pane-exited", ""),
1266 	OPTIONS_TABLE_PANE_HOOK("pane-focus-in", ""),
1267 	OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""),
1268 	OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""),
1269 	OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""),
1270 	OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""),
1271 	OPTIONS_TABLE_HOOK("session-closed", ""),
1272 	OPTIONS_TABLE_HOOK("session-created", ""),
1273 	OPTIONS_TABLE_HOOK("session-renamed", ""),
1274 	OPTIONS_TABLE_HOOK("session-window-changed", ""),
1275 	OPTIONS_TABLE_WINDOW_HOOK("window-layout-changed", ""),
1276 	OPTIONS_TABLE_HOOK("window-linked", ""),
1277 	OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
1278 	OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
1279 	OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
1280 	OPTIONS_TABLE_HOOK("window-unlinked", ""),
1281 
1282 	{ .name = NULL }
1283 };
1284