X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Fcompletion.c;h=8564e9d8e1e61de75436e6005ab0bd2b375c9177;hb=1154aff2c68b7ac156713c7fd66b5aa8907a3cb2;hp=287c5aad4a6477602f112bffe2bf28a812a10e64;hpb=d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e;p=libguestfs.git diff --git a/fish/completion.c b/fish/completion.c index 287c5aa..8564e9d 100644 --- a/fish/completion.c +++ b/fish/completion.c @@ -175,6 +175,15 @@ static const char *const commands[] = { "resize2fs", "find", "e2fsck-f", + "sleep", + "ntfs-3g-probe", + "sh", + "sh-lines", + "glob-expand", + "scrub-device", + "scrub-file", + "scrub-freespace", + "mkdtemp", NULL }; @@ -189,6 +198,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 +216,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;