mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
64e6e92f20
commit
0bfffb33ce
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
if (*list != NULL) signal_stop();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user