X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Ffish.c;h=a36ec09afa8017eab2a6dfb0b6826d0fd6fa4714;hp=54989fc9b6b1d9b71d52cdcde0591cddc8388bf9;hb=78d2523ec8997679f7fca810de60620df4001e16;hpb=d054dfb2f948f53188f448d2c7fade83db9bbab8 diff --git a/fish/fish.c b/fish/fish.c index 54989fc..a36ec09 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -622,7 +622,8 @@ script (int prompt) "Welcome to guestfish, the libguestfs filesystem interactive shell for\n" "editing virtual machine filesystems.\n" "\n" - "Type: 'help' for help with commands\n" + "Type: 'help' for a list of commands\n" + " 'man' to read the manual\n" " 'quit' to quit the shell\n" "\n")); @@ -943,6 +944,9 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) r = do_lcd (cmd, argc, argv); else if (STRCASEEQ (cmd, "glob")) r = do_glob (cmd, argc, argv); + else if (STRCASEEQ (cmd, "man") || + STRCASEEQ (cmd, "manual")) + r = do_man (cmd, argc, argv); else if (STRCASEEQ (cmd, "more") || STRCASEEQ (cmd, "less")) r = do_more (cmd, argc, argv); @@ -982,10 +986,12 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) void list_builtin_commands (void) { - /* help and quit should appear at the top */ + /* help, man and quit should appear at the top */ printf ("%-20s %s\n", "help", _("display a list of commands or help on a command")); printf ("%-20s %s\n", + "man", _("read the manual")); + printf ("%-20s %s\n", "quit", _("quit guestfish")); printf ("%-20s %s\n", @@ -1070,6 +1076,12 @@ display_builtin_command (const char *cmd) " Glob runs with wildcards expanded in any\n" " command args. Note that the command is run repeatedly\n" " once for each expanded argument.\n")); + else if (STRCASEEQ (cmd, "man") || + STRCASEEQ (cmd, "manual")) + printf (_("man - read the manual\n" + " man\n" + "\n" + " Opens the manual page for guestfish.\n")); else if (STRCASEEQ (cmd, "help")) printf (_("help - display a list of commands or help on a command\n" " help cmd\n"