version 1.53, 2012/02/25 12:57:42 |
version 1.54, 2012/03/17 21:33:33 |
|
|
|
|
const struct cmd_entry cmd_set_option_entry = { |
const struct cmd_entry cmd_set_option_entry = { |
"set-option", "set", |
"set-option", "set", |
"agst:uw", 1, 2, |
"agqst:uw", 1, 2, |
"[-agsuw] [-t target-session|target-window] option [value]", |
"[-agsquw] [-t target-session|target-window] option [value]", |
0, |
0, |
NULL, |
NULL, |
NULL, |
NULL, |
|
|
|
|
const struct cmd_entry cmd_set_window_option_entry = { |
const struct cmd_entry cmd_set_window_option_entry = { |
"set-window-option", "setw", |
"set-window-option", "setw", |
"agt:u", 1, 2, |
"agqt:u", 1, 2, |
"[-agu] " CMD_TARGET_WINDOW_USAGE " option [value]", |
"[-agqu] " CMD_TARGET_WINDOW_USAGE " option [value]", |
0, |
0, |
NULL, |
NULL, |
NULL, |
NULL, |
|
|
} |
} |
|
|
options_remove(oo, oe->name); |
options_remove(oo, oe->name); |
ctx->info(ctx, "unset option: %s", oe->name); |
if (!args_has(args, 'q')) |
|
ctx->info(ctx, "unset option: %s", oe->name); |
return (0); |
return (0); |
} |
} |
|
|
|
|
cmd_set_option_set(struct cmd *self, struct cmd_ctx *ctx, |
cmd_set_option_set(struct cmd *self, struct cmd_ctx *ctx, |
const struct options_table_entry *oe, struct options *oo, const char *value) |
const struct options_table_entry *oe, struct options *oo, const char *value) |
{ |
{ |
|
struct args *args = self->args; |
struct options_entry *o; |
struct options_entry *o; |
const char *s; |
const char *s; |
|
|
|
|
return (-1); |
return (-1); |
|
|
s = options_table_print_entry(oe, o); |
s = options_table_print_entry(oe, o); |
ctx->info(ctx, "set option: %s -> %s", oe->name, s); |
if (!args_has(args, 'q')) |
|
ctx->info(ctx, "set option: %s -> %s", oe->name, s); |
return (0); |
return (0); |
} |
} |
|
|
|
|
cmd_set_option_string(struct cmd *self, unused struct cmd_ctx *ctx, |
cmd_set_option_string(struct cmd *self, unused struct cmd_ctx *ctx, |
const struct options_table_entry *oe, struct options *oo, const char *value) |
const struct options_table_entry *oe, struct options *oo, const char *value) |
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
struct options_entry *o; |
struct options_entry *o; |
char *oldval, *newval; |
char *oldval, *newval; |
|
|