summaryrefslogtreecommitdiffstats
path: root/cmd-show-options.c
diff options
context:
space:
mode:
authornicm <nicm>2020-05-16 16:02:24 +0000
committernicm <nicm>2020-05-16 16:02:24 +0000
commitd67245c734c9c600ad6d186570a1230aa21b80c8 (patch)
tree9e71286a88716251c09d3dd2c2b323074f9f40ff /cmd-show-options.c
parent472d77fd0f4af8431267473df3cf109030760fa1 (diff)
Add a customize mode where keys and options may be browsed and changed,
includes adding a brief description of each option. Bound to "C" by default.
Diffstat (limited to 'cmd-show-options.c')
-rw-r--r--cmd-show-options.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c
index e2aec930..8e70eaa9 100644
--- a/cmd-show-options.c
+++ b/cmd-show-options.c
@@ -151,7 +151,7 @@ cmd_show_options_print(struct cmd *self, struct cmdq_item *item,
xasprintf(&tmp, "%s[%d]", name, idx);
name = tmp;
} else {
- if (options_isarray(o)) {
+ if (options_is_array(o)) {
a = options_array_first(o);
if (a == NULL) {
if (!args_has(args, 'v'))
@@ -168,10 +168,10 @@ cmd_show_options_print(struct cmd *self, struct cmdq_item *item,
}
}
- value = options_tostring(o, idx, 0);
+ value = options_to_string(o, idx, 0);
if (args_has(args, 'v'))
cmdq_print(item, "%s", value);
- else if (options_isstring(o)) {
+ else if (options_is_string(o)) {
escaped = args_escape(value);
if (parent)
cmdq_print(item, "%s* %s", name, escaped);
@@ -229,7 +229,7 @@ cmd_show_options_all(struct cmd *self, struct cmdq_item *item, int scope,
} else
parent = 0;
- if (!options_isarray(o))
+ if (!options_is_array(o))
cmd_show_options_print(self, item, o, -1, parent);
else if ((a = options_array_first(o)) == NULL) {
if (!args_has(args, 'v')) {