aboutsummaryrefslogtreecommitdiff
path: root/options-table.c
diff options
context:
space:
mode:
authorThomas Adam <thomas.adam@smoothwall.net>2013-03-25 14:59:29 +0000
committerThomas Adam <thomas.adam@smoothwall.net>2013-03-25 14:59:29 +0000
commitf90eb43fcb12720711ea01b110c5b474111e6600 (patch)
tree43b2e85bcf1626e3810ade10578ac18399931772 /options-table.c
parent418ba99078a2712ece398e17a5a9bc1f6600126b (diff)
parent58bb6f8c5650d496fb3b872766c0278aa024631d (diff)
downloadrtmux-f90eb43fcb12720711ea01b110c5b474111e6600.tar.gz
rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.tar.bz2
rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.zip
Merge branch 'obsd-master'
Diffstat (limited to 'options-table.c')
-rw-r--r--options-table.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/options-table.c b/options-table.c
index 83ec97f2..e5f6c777 100644
--- a/options-table.c
+++ b/options-table.c
@@ -476,7 +476,6 @@ const struct options_table_entry window_options_table[] = {
.default_num = 1
},
-
{ .name = "c0-change-trigger",
.type = OPTIONS_TABLE_NUMBER,
.default_num = 250,
@@ -502,6 +501,11 @@ const struct options_table_entry window_options_table[] = {
.default_num = 1
},
+ { .name = "command-prefix",
+ .type = OPTIONS_TABLE_STRING,
+ .default_str = "exec "
+ },
+
{ .name = "force-height",
.type = OPTIONS_TABLE_NUMBER,
.minimum = 0,
@@ -745,8 +749,8 @@ options_table_populate_tree(
/* Print an option using its type from the table. */
const char *
-options_table_print_entry(
- const struct options_table_entry *oe, struct options_entry *o)
+options_table_print_entry(const struct options_table_entry *oe,
+ struct options_entry *o, int no_quotes)
{
static char out[BUFSIZ];
const char *s;
@@ -754,13 +758,17 @@ options_table_print_entry(
*out = '\0';
switch (oe->type) {
case OPTIONS_TABLE_STRING:
- xsnprintf(out, sizeof out, "\"%s\"", o->str);
+ if (no_quotes)
+ xsnprintf(out, sizeof out, "%s", o->str);
+ else
+ xsnprintf(out, sizeof out, "\"%s\"", o->str);
break;
case OPTIONS_TABLE_NUMBER:
xsnprintf(out, sizeof out, "%lld", o->num);
break;
case OPTIONS_TABLE_KEY:
- xsnprintf(out, sizeof out, "%s", key_string_lookup_key(o->num));
+ xsnprintf(out, sizeof out, "%s",
+ key_string_lookup_key(o->num));
break;
case OPTIONS_TABLE_COLOUR:
s = colour_tostring(o->num);