1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Enhance /set completer to complete option names also when a command option

is present and to complete option values.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4543 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2007-06-06 17:49:10 +00:00 committed by exg
parent 64e6e92f20
commit 0bfffb33ce

View File

@ -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();
}