From f40e9513b25b6ae4757b612065d036c635d8afaf Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 6 Jun 2002 19:22:16 +0000 Subject: [PATCH] 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 --- src/fe-common/core/completion.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)) {