Add more features for boolean expressions in formats: 1) extend && and

|| to support arbitrarily many arguments and 2) add ! and !! for not and
not-not.
This commit is contained in:
nicm
2025-04-25 08:28:21 +00:00
parent f53fac1b56
commit 1efe41b9b9
2 changed files with 88 additions and 16 deletions

10
tmux.1
View File

@ -5704,9 +5704,17 @@ otherwise by
.Ql ||
and
.Ql &&
evaluate to true if either or both of two comma-separated alternatives are
evaluate to true if any or all of the comma-separated alternatives are
true, for example
.Ql #{||:#{pane_in_mode},#{alternate_on}} .
.Ql \&!
evaluates to true if the value is false and vice versa, for example
.Ql #{!:#{pane_in_mode}} .
.Ql !!
converts a value to a canonical boolean form, 1 for true and 0 for false, for
example
.Ql #{!!:non-empty string}
evaluates to 1.
.Pp
An
.Ql m