Generated code for mknod, mkfifo, mknod_b, mknod_c, umask.
[libguestfs.git] / fish / completion.c
index 264c584..2ddae2e 100644 (file)
@@ -65,6 +65,9 @@ static const char *const commands[] = {
   "is-launching",
   "is-busy",
   "get-state",
+  "set-memsize",
+  "memsize",
+  "get-memsize",
   "mount",
   "sync",
   "touch",
@@ -177,6 +180,33 @@ static const char *const commands[] = {
   "e2fsck-f",
   "sleep",
   "ntfs-3g-probe",
+  "sh",
+  "sh-lines",
+  "glob-expand",
+  "scrub-device",
+  "scrub-file",
+  "scrub-freespace",
+  "mkdtemp",
+  "wc-l",
+  "wc-w",
+  "wc-c",
+  "head",
+  "head-n",
+  "tail",
+  "tail-n",
+  "df",
+  "df-h",
+  "du",
+  "initrd-list",
+  "mount-loop",
+  "mkswap",
+  "mkswap-L",
+  "mkswap-U",
+  "mknod",
+  "mkfifo",
+  "mknod-b",
+  "mknod-c",
+  "umask",
   NULL
 };
 
@@ -191,6 +221,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 +239,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;