X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=cf547c4e02d34ec693835eaa83cece6820148b84;hb=f383ac139f5575754715a9dfbe88c67346eaa6e5;hp=969654531894ddfdb415dcedb8d2f4c5a6d5c755;hpb=54837f6d7ba83178625e2f0c3c063457d9f3f79c;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index 9696545..cf547c4 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -318,7 +318,10 @@ main (int argc, char *argv[]) break; case 'N': - if (STRCASEEQ (optarg, "list")) { + if (STRCASEEQ (optarg, "list") || + STRCASEEQ (optarg, "help") || + STRCASEEQ (optarg, "h") || + STRCASEEQ (optarg, "?")) { list_prepared_drives (); exit (EXIT_SUCCESS); } @@ -1058,6 +1061,12 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) else if (STRCASEEQ (cmd, "alloc") || STRCASEEQ (cmd, "allocate")) r = do_alloc (cmd, argc, argv); + else if (STRCASEEQ (cmd, "copy-in") || + STRCASEEQ (cmd, "copy_in")) + r = do_copy_in (cmd, argc, argv); + else if (STRCASEEQ (cmd, "copy-out") || + STRCASEEQ (cmd, "copy_out")) + r = do_copy_out (cmd, argc, argv); else if (STRCASEEQ (cmd, "echo")) r = do_echo (cmd, argc, argv); else if (STRCASEEQ (cmd, "edit") || @@ -1123,6 +1132,10 @@ list_builtin_commands (void) printf ("%-20s %s\n", "alloc", _("allocate an image")); printf ("%-20s %s\n", + "copy-in", _("copy files into an image")); + printf ("%-20s %s\n", + "copy-out", _("copy files out of an image")); + printf ("%-20s %s\n", "echo", _("display a line of text")); printf ("%-20s %s\n", "edit", _("edit a file in the image")); @@ -1163,6 +1176,26 @@ display_builtin_command (const char *cmd) )); return 0; } + else if (STRCASEEQ (cmd, "copy-in") || + STRCASEEQ (cmd, "copy_in")) { + printf (_("copy-in - copy files into an image\n" + " copy-in [ ...] \n" + "\n" + " Copy local files or directories recursively into the\n" + " image, placing them on a remote directory.\n" + )); + return 0; + } + else if (STRCASEEQ (cmd, "copy-out") || + STRCASEEQ (cmd, "copy_out")) { + printf (_("copy-out - copy files out of an image\n" + " copy-out [ ...] \n" + "\n" + " Copy remote files or directories recursively out of the\n" + " image, placing them in a local directory.\n" + )); + return 0; + } else if (STRCASEEQ (cmd, "echo")) { printf (_("echo - display a line of text\n" " echo [ ...]\n"