summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fe-common/core/completion.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c
index 88e9b029..150af51e 100644
--- a/src/fe-common/core/completion.c
+++ b/src/fe-common/core/completion.c
@@ -677,9 +677,18 @@ static void sig_complete_set(GList **list, WINDOW_REC *window,
g_return_if_fail(word != NULL);
g_return_if_fail(line != NULL);
- if (*line != '\0') return;
+ if (*line == '\0' ||
+ !strcmp("-clear", line) || !strcmp("-default", line))
+ *list = completion_get_settings(word, -1);
+ else if (*line != '\0' && *word == '\0') {
+ SETTINGS_REC *rec = settings_get_record(line);
+ if (rec != NULL) {
+ char *value = settings_get_print(rec);
+ if (value != NULL)
+ *list = g_list_append(*list, value);
+ }
+ }
- *list = completion_get_settings(word, -1);
if (*list != NULL) signal_stop();
}