X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Fcompletion.c;h=92843e562acd29f72f05708b993df3c52353cab2;hp=287c5aad4a6477602f112bffe2bf28a812a10e64;hb=94a49c8207277ec4017a0fb9a3cd8f1e61a518f6;hpb=d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e diff --git a/fish/completion.c b/fish/completion.c index 287c5aa..92843e5 100644 --- a/fish/completion.c +++ b/fish/completion.c @@ -175,6 +175,14 @@ static const char *const commands[] = { "resize2fs", "find", "e2fsck-f", + "sleep", + "ntfs-3g-probe", + "sh", + "sh-lines", + "glob-expand", + "scrub-device", + "scrub-file", + "scrub-freespace", NULL }; @@ -189,6 +197,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) @@ -205,8 +215,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;