From 9c4caf49a2e65ca03efe67332493de28c177be14 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 6 Oct 2017 18:02:30 +0000 Subject: Support %else in config files to match %if, from Brad Town in GitHub issue 1071. --- tmux.1 | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 45eb83b2..218a16d2 100644 --- a/tmux.1 +++ b/tmux.1 @@ -976,22 +976,37 @@ them with and .Em %endif lines. +Additional +.Em %elif +and +.Em %else +lines may also be used. The argument to .Em %if -is expanded as a format and if it evaluates to false -(zero or empty), subsequent lines are ignored until +and +.Em %elif +is expanded as a format and if it evaluates to false (zero or empty), +subsequent lines are ignored until the next +.Em %elif , +.Em %else +or .Em %endif . For example: .Bd -literal -offset indent %if #{==:#{host},myhost} set -g status-style bg=red +%elif #{==:#{host},myotherhost} +set -g status-style bg=green +%else +set -g status-style bg=blue %endif .Ed .Pp Will change the status line to red if running on -.Ql myhost . -.Em %if -may not be nested. +.Ql myhost , +green if running on +.Ql myotherhost , +or blue if running on another host. .It Ic start-server .D1 (alias: Ic start ) Start the -- cgit From 0b4c408168c170f0986a8dd862ec949942b2eaa8 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 8 Oct 2017 16:45:01 +0000 Subject: Fix description of history_size, from Campbell Barton. --- tmux.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 218a16d2..1d02efab 100644 --- a/tmux.1 +++ b/tmux.1 @@ -3649,7 +3649,7 @@ The following variables are available, where appropriate: .It Li "cursor_y" Ta "" Ta "Cursor Y position in pane" .It Li "history_bytes" Ta "" Ta "Number of bytes in window history" .It Li "history_limit" Ta "" Ta "Maximum window history lines" -.It Li "history_size" Ta "" Ta "Size of history in bytes" +.It Li "history_size" Ta "" Ta "Size of history in lines" .It Li "hook" Ta "" Ta "Name of running hook, if any" .It Li "hook_pane" Ta "" Ta "ID of pane where hook was run, if any" .It Li "hook_session" Ta "" Ta "ID of session where hook was run, if any" -- cgit