summaryrefslogtreecommitdiffstats
path: root/fish/completion.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@centos5x32.home.annexia.org>2009-07-03 00:22:14 +0100
committerRichard Jones <rjones@centos5x32.home.annexia.org>2009-07-03 00:22:14 +0100
commit6fb57e430c8daa06d8d938ac02a104c8aadbbda5 (patch)
tree38586363a6a7d68e5559347d1cc7671593c81aed /fish/completion.c
parentb7e094fa14b306fe776b9b2695cf82fa32d4923f (diff)
parentee4c49fad5a3e36c6e909ab90bcb7d719c9395b3 (diff)
downloadlibguestfs-6fb57e430c8daa06d8d938ac02a104c8aadbbda5.tar.gz
libguestfs-6fb57e430c8daa06d8d938ac02a104c8aadbbda5.tar.xz
libguestfs-6fb57e430c8daa06d8d938ac02a104c8aadbbda5.zip
Merge branch 'master' of git+ssh://192.168.122.1/home/rjones/d/libguestfs
Diffstat (limited to 'fish/completion.c')
-rw-r--r--fish/completion.c215
1 files changed, 0 insertions, 215 deletions
diff --git a/fish/completion.c b/fish/completion.c
deleted file mode 100644
index 264c5840..00000000
--- a/fish/completion.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/* libguestfs generated file
- * WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
- * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
- *
- * Copyright (C) 2009 Red Hat Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef HAVE_LIBREADLINE
-#include <readline/readline.h>
-#endif
-
-#include "fish.h"
-
-#ifdef HAVE_LIBREADLINE
-
-static const char *const commands[] = {
- BUILTIN_COMMANDS_FOR_COMPLETION,
- "launch",
- "run",
- "kill-subprocess",
- "add-drive",
- "add",
- "add-cdrom",
- "cdrom",
- "add-drive-ro",
- "add-ro",
- "config",
- "set-qemu",
- "qemu",
- "get-qemu",
- "set-path",
- "path",
- "get-path",
- "set-append",
- "append",
- "get-append",
- "set-autosync",
- "autosync",
- "get-autosync",
- "set-verbose",
- "verbose",
- "get-verbose",
- "is-ready",
- "is-config",
- "is-launching",
- "is-busy",
- "get-state",
- "mount",
- "sync",
- "touch",
- "cat",
- "ll",
- "ls",
- "list-devices",
- "list-partitions",
- "pvs",
- "vgs",
- "lvs",
- "pvs-full",
- "vgs-full",
- "lvs-full",
- "read-lines",
- "aug-init",
- "aug-close",
- "aug-defvar",
- "aug-defnode",
- "aug-get",
- "aug-set",
- "aug-insert",
- "aug-rm",
- "aug-mv",
- "aug-match",
- "aug-save",
- "aug-load",
- "aug-ls",
- "rm",
- "rmdir",
- "rm-rf",
- "mkdir",
- "mkdir-p",
- "chmod",
- "chown",
- "exists",
- "is-file",
- "is-dir",
- "pvcreate",
- "vgcreate",
- "lvcreate",
- "mkfs",
- "sfdisk",
- "write-file",
- "umount",
- "unmount",
- "mounts",
- "umount-all",
- "unmount-all",
- "lvm-remove-all",
- "file",
- "command",
- "command-lines",
- "stat",
- "lstat",
- "statvfs",
- "tune2fs-l",
- "blockdev-setro",
- "blockdev-setrw",
- "blockdev-getro",
- "blockdev-getss",
- "blockdev-getbsz",
- "blockdev-setbsz",
- "blockdev-getsz",
- "blockdev-getsize64",
- "blockdev-flushbufs",
- "blockdev-rereadpt",
- "upload",
- "download",
- "checksum",
- "tar-in",
- "tar-out",
- "tgz-in",
- "tgz-out",
- "mount-ro",
- "mount-options",
- "mount-vfs",
- "debug",
- "lvremove",
- "vgremove",
- "pvremove",
- "set-e2label",
- "get-e2label",
- "set-e2uuid",
- "get-e2uuid",
- "fsck",
- "zero",
- "grub-install",
- "cp",
- "cp-a",
- "mv",
- "drop-caches",
- "dmesg",
- "ping-daemon",
- "equal",
- "strings",
- "strings-e",
- "hexdump",
- "zerofree",
- "pvresize",
- "sfdisk-N",
- "sfdisk-l",
- "sfdisk-kernel-geometry",
- "sfdisk-disk-geometry",
- "vg-activate-all",
- "vg-activate",
- "lvresize",
- "resize2fs",
- "find",
- "e2fsck-f",
- "sleep",
- "ntfs-3g-probe",
- NULL
-};
-
-static char *
-generator (const char *text, int state)
-{
- static int index, len;
- const char *name;
-
- if (!state) {
- index = 0;
- len = strlen (text);
- }
-
- while ((name = commands[index]) != NULL) {
- index++;
- if (strncasecmp (name, text, len) == 0)
- return strdup (name);
- }
-
- return NULL;
-}
-
-#endif /* HAVE_LIBREADLINE */
-
-char **do_completion (const char *text, int start, int end)
-{
- char **matches = NULL;
-
-#ifdef HAVE_LIBREADLINE
- if (start == 0)
- matches = rl_completion_matches (text, generator);
-#endif
-
- return matches;
-}