diff options
author | Timo Sirainen <cras@irssi.org> | 2002-06-06 19:22:16 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-06-06 19:22:16 +0000 |
commit | f40e9513b25b6ae4757b612065d036c635d8afaf (patch) | |
tree | eea7fcb926144e6e181bc3b223122b530a0bcf4d /src | |
parent | 6910ca4d250545bed381f9775af3c0831d63e8eb (diff) | |
download | irssi-f40e9513b25b6ae4757b612065d036c635d8afaf.zip |
When completing words beginning with '/' or '~' chars, treat them as
filenames.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2841 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/completion.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index 2298b937..7a9c9ad3 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -592,6 +592,16 @@ static void sig_complete_word(GList **list, WINDOW_REC *window, return; } + if (*linestart != '\0' && (*word == '/' || *word == '~')) { + /* quite likely filename completion */ + *list = g_list_concat(*list, filename_complete(word, NULL)); + if (*list != NULL) { + *want_space = FALSE; + signal_stop(); + return; + } + } + /* command completion? */ cmdchars = settings_get_str("cmdchars"); if (*word != '\0' && *linestart == '\0' && strchr(cmdchars, *word)) { |