version 1.16, 2012/07/11 07:10:15 |
version 1.17, 2013/03/21 16:15:52 |
|
|
|
|
const struct cmd_entry cmd_show_options_entry = { |
const struct cmd_entry cmd_show_options_entry = { |
"show-options", "show", |
"show-options", "show", |
"gst:w", 0, 1, |
"gst:vw", 0, 1, |
"[-gsw] [-t target-session|target-window] [option]", |
"[-gsvw] [-t target-session|target-window] [option]", |
0, |
0, |
NULL, |
NULL, |
NULL, |
NULL, |
|
|
|
|
const struct cmd_entry cmd_show_window_options_entry = { |
const struct cmd_entry cmd_show_window_options_entry = { |
"show-window-options", "showw", |
"show-window-options", "showw", |
"gt:", 0, 1, |
"gvt:", 0, 1, |
"[-g] " CMD_TARGET_WINDOW_USAGE " [option]", |
"[-gv] " CMD_TARGET_WINDOW_USAGE " [option]", |
0, |
0, |
NULL, |
NULL, |
NULL, |
NULL, |
|
|
} |
} |
if ((o = options_find1(oo, oe->name)) == NULL) |
if ((o = options_find1(oo, oe->name)) == NULL) |
return (CMD_RETURN_NORMAL); |
return (CMD_RETURN_NORMAL); |
optval = options_table_print_entry(oe, o); |
optval = options_table_print_entry(oe, o, |
ctx->print(ctx, "%s %s", oe->name, optval); |
args_has(self->args, 'v')); |
|
if (args_has(self->args, 'v')) |
|
ctx->print(ctx, "%s", optval); |
|
else |
|
ctx->print(ctx, "%s %s", oe->name, optval); |
} else { |
} else { |
for (oe = table; oe->name != NULL; oe++) { |
for (oe = table; oe->name != NULL; oe++) { |
if ((o = options_find1(oo, oe->name)) == NULL) |
if ((o = options_find1(oo, oe->name)) == NULL) |
continue; |
continue; |
optval = options_table_print_entry(oe, o); |
optval = options_table_print_entry(oe, o, |
ctx->print(ctx, "%s %s", oe->name, optval); |
args_has(self->args, 'v')); |
|
if (args_has(self->args, 'v')) |
|
ctx->print(ctx, "%s", optval); |
|
else |
|
ctx->print(ctx, "%s %s", oe->name, optval); |
} |
} |
} |
} |
|
|