diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-18 21:06:22 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-18 21:06:22 +0100 |
commit | e395d7db8fd3fe3d1b121258fe2f401d6b3e64c8 (patch) | |
tree | e825bef2cf986c4d3cc3db34fcb19ee85cb27979 /fish/completion.c | |
parent | ace1f0ee2b0a2534e45f14599e38d2d06a03d4d4 (diff) | |
download | libguestfs-e395d7db8fd3fe3d1b121258fe2f401d6b3e64c8.tar.gz libguestfs-e395d7db8fd3fe3d1b121258fe2f401d6b3e64c8.tar.xz libguestfs-e395d7db8fd3fe3d1b121258fe2f401d6b3e64c8.zip |
Add tab-completion of guest filenames (currently disabled).
Diffstat (limited to 'fish/completion.c')
-rw-r--r-- | fish/completion.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fish/completion.c b/fish/completion.c index 264c5840..43c4f647 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; |