aboutsummaryrefslogtreecommitdiff
path: root/cmd-set-window-option.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-04 18:45:57 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-04 18:45:57 +0000
commit12ef3ceda13f9ae4c77384f98e6f145322971e69 (patch)
tree0202ba1ce7451cd8d6ce8568f21f17fff5a58842 /cmd-set-window-option.c
parenta0647f1616da3a2b5fc7ce831ea83519832a196e (diff)
downloadrtmux-12ef3ceda13f9ae4c77384f98e6f145322971e69.tar.gz
rtmux-12ef3ceda13f9ae4c77384f98e6f145322971e69.tar.bz2
rtmux-12ef3ceda13f9ae4c77384f98e6f145322971e69.zip
Add a -a flag to set-option and set-window-option to append to an existing
string value, useful for terminal-overrides.
Diffstat (limited to 'cmd-set-window-option.c')
-rw-r--r--cmd-set-window-option.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-set-window-option.c b/cmd-set-window-option.c
index 1d90425d..beeb26e2 100644
--- a/cmd-set-window-option.c
+++ b/cmd-set-window-option.c
@@ -31,8 +31,8 @@ int cmd_set_window_option_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_set_window_option_entry = {
"set-window-option", "setw",
- CMD_OPTION_WINDOW_USAGE,
- 0, CMD_CHFLAG('g')|CMD_CHFLAG('u'),
+ "[-agu] " CMD_OPTION_WINDOW_USAGE,
+ 0, CMD_CHFLAG('a')|CMD_CHFLAG('g')|CMD_CHFLAG('u'),
NULL,
cmd_option_parse,
cmd_set_window_option_exec,
@@ -134,7 +134,8 @@ cmd_set_window_option_exec(struct cmd *self, struct cmd_ctx *ctx)
} else {
switch (entry->type) {
case SET_OPTION_STRING:
- set_option_string(ctx, oo, entry, data->value);
+ set_option_string(ctx, oo, entry,
+ data->value, data->chflags & CMD_CHFLAG('a'));
break;
case SET_OPTION_NUMBER:
set_option_number(ctx, oo, entry, data->value);