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 /src | |
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 'src')
-rwxr-xr-x | src/generator.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml index 0a0f9b17..d8abfd63 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4803,6 +4803,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) @@ -4819,8 +4821,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; |