From 12ef3ceda13f9ae4c77384f98e6f145322971e69 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 4 Aug 2009 18:45:57 +0000 Subject: Add a -a flag to set-option and set-window-option to append to an existing string value, useful for terminal-overrides. --- cmd-set-option.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd-set-option.c') diff --git a/cmd-set-option.c b/cmd-set-option.c index 5c2d5870..de6141a1 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -31,8 +31,8 @@ int cmd_set_option_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_set_option_entry = { "set-option", "set", - CMD_OPTION_SESSION_USAGE, - 0, CMD_CHFLAG('g')|CMD_CHFLAG('u'), + "[-agu] " CMD_OPTION_SESSION_USAGE, + 0, CMD_CHFLAG('a')|CMD_CHFLAG('g')|CMD_CHFLAG('u'), NULL, cmd_option_parse, cmd_set_option_exec, @@ -144,7 +144,8 @@ cmd_set_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); -- cgit