aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-10-12 11:08:02 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-10-12 11:08:02 +0000
commit33ae063cae422dc97633ac43a4f8ded43da5c143 (patch)
tree079f02086805590547548c1e4ce2d25123761e68
parent762459954f1b8f00f93780212053288d6096a611 (diff)
downloadrtmux-33ae063cae422dc97633ac43a4f8ded43da5c143.tar.gz
rtmux-33ae063cae422dc97633ac43a4f8ded43da5c143.tar.bz2
rtmux-33ae063cae422dc97633ac43a4f8ded43da5c143.zip
Permit attributes to be turned off in #[] by prefixing with "no", for example
"noblink".
-rw-r--r--screen-write.c4
-rw-r--r--tmux.112
2 files changed, 12 insertions, 4 deletions
diff --git a/screen-write.c b/screen-write.c
index 507c527b..a0c28575 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -347,6 +347,10 @@ screen_write_parsestyle(
bg = defgc->bg;
} else
return;
+ } else if (end > 2 && strncasecmp(tmp, "no", 2) == 0) {
+ if ((val = attributes_fromstring(tmp + 2)) == -1)
+ return;
+ attr &= ~val;
} else {
if ((val = attributes_fromstring(tmp)) == -1)
return;
diff --git a/tmux.1 b/tmux.1
index 5954cc7c..fc1801f2 100644
--- a/tmux.1
+++ b/tmux.1
@@ -1470,22 +1470,26 @@ the
.Ic status-interval
option: if the status line is redrawn in the meantime, the previous result is
used.
+.Pp
#[attributes] allows a comma-separated list of attributes to be specified,
these may be
.Ql fg=colour
to set the foreground colour,
.Ql bg=colour
-to set the background colour, or one of the attributes described under the
+to set the background colour, the name of one of the attributes (listed under the
.Ic message-attr
-option.
+option) to turn an attribute on, or an attribute prefixed with
+.Ql no
+to turn one off, for example
+.Ic nobright .
Examples are:
.Bd -literal -offset indent
#(sysctl vm.loadavg)
#[fg=yellow,bold]#(apm -l)%%#[default] [#S]
.Ed
.Pp
-Where appropriate, these may be prefixed with a number to specify the maximum
-length, for example
+Where appropriate, special character sequences may be prefixed with a number to
+specify the maximum length, for example
.Ql #24T .
.Pp
By default, UTF-8 in