X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Fcompletion.c;h=43c4f64742756dba41ec686fa34c14caf4cd8cfa;hp=264c5840dc97ad481b8c67b32df4e0ad9d38fba0;hb=e395d7db8fd3fe3d1b121258fe2f401d6b3e64c8;hpb=460d139e6a52da67a4f1947035b1978610349f78 diff --git a/fish/completion.c b/fish/completion.c index 264c584..43c4f64 100644 --- a/fish/completion.c +++ b/fish/completion.c @@ -191,6 +191,8 @@ generator (const char *text, int state) len = strlen (text); } + rl_attempted_completion_over = 1; + while ((name = commands[index]) != NULL) { index++; if (strncasecmp (name, text, len) == 0) @@ -207,8 +209,12 @@ char **do_completion (const char *text, int start, int end) char **matches = NULL; #ifdef HAVE_LIBREADLINE + rl_completion_append_character = ' '; + if (start == 0) matches = rl_completion_matches (text, generator); + else if (complete_dest_paths) + matches = rl_completion_matches (text, complete_dest_paths_generator); #endif return matches;