- if (STRCASEEQ (cmd, "alloc") ||
- STRCASEEQ (cmd, "allocate")) {
- printf (_("alloc - allocate an image\n"
- " alloc <filename> <size>\n"
- "\n"
- " This creates an empty (zeroed) file of the given size,\n"
- " and then adds so it can be further examined.\n"
- "\n"
- " For more advanced image creation, see qemu-img utility.\n"
- "\n"
- " Size can be specified using standard suffixes, eg. '1M'.\n"
- ));
- return 0;
- }
- else if (STRCASEEQ (cmd, "copy-in") ||
- STRCASEEQ (cmd, "copy_in")) {
- printf (_("copy-in - copy files into an image\n"
- " copy-in <local> [<local> ...] <remotedir>\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 <remote> [<remote> ...] <localdir>\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 [<params> ...]\n"
- "\n"
- " This echos the parameters to the terminal.\n"));
- return 0;
- }
- else if (STRCASEEQ (cmd, "edit") ||
- STRCASEEQ (cmd, "vi") ||
- STRCASEEQ (cmd, "emacs")) {
- printf (_("edit - edit a file in the image\n"
- " edit <filename>\n"
- "\n"
- " This is used to edit a file.\n"
- "\n"
- " It is the equivalent of (and is implemented by)\n"
- " running \"cat\", editing locally, and then \"write\".\n"
- "\n"
- " Normally it uses $EDITOR, but if you use the aliases\n"
- " \"vi\" or \"emacs\" you will get those editors.\n"));
- return 0;
- }
- else if (STRCASEEQ (cmd, "lcd")) {
- printf (_("lcd - local change directory\n"
- " lcd <directory>\n"
- "\n"
- " Change guestfish's current directory. This command is\n"
- " useful if you want to download files to a particular\n"
- " place.\n"));
- return 0;
- }
- else if (STRCASEEQ (cmd, "glob")) {
- printf (_("glob - expand wildcards in command\n"
- " glob <command> [<args> ...]\n"
- "\n"
- " Glob runs <command> with wildcards expanded in any\n"
- " command args. Note that the command is run repeatedly\n"
- " once for each expanded argument.\n"));
- return 0;
- }
- else if (STRCASEEQ (cmd, "man") ||
- STRCASEEQ (cmd, "manual")) {
- printf (_("man - read the manual\n"
- " man\n"
- "\n"
- " Opens the manual page for guestfish.\n"));
- return 0;
- }
- else if (STRCASEEQ (cmd, "help")) {