imagex.c: Recommend man page when running wimlib-imagex update interactively
authorEric Biggers <ebiggers3@gmail.com>
Sun, 12 May 2013 06:59:37 +0000 (01:59 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 12 May 2013 06:59:37 +0000 (01:59 -0500)
programs/imagex.c

index 42ba17fa8a7856cda80576464d094d7abbdbf9f5..ae8cd0f4181d11f367fc4ff11b693ce863f00505 100644 (file)
@@ -185,11 +185,11 @@ static void
 recommend_man_page(const tchar *cmd_name)
 {
 #ifdef __WIN32__
-       tprintf(T("\nSee "IMAGEX_PROGNAME"-%"TS".pdf in the "
+       tprintf(T("See "IMAGEX_PROGNAME"-%"TS".pdf in the "
                  "doc directory for more details.\n"),
                cmd_name);
 #else
-       tprintf(T("\nTry `man "IMAGEX_PROGNAME"-%"TS"' "
+       tprintf(T("Try `man "IMAGEX_PROGNAME"-%"TS"' "
                  "for more details.\n"), cmd_name);
 #endif
 }
@@ -3005,6 +3005,7 @@ imagex_update(int argc, tchar **argv)
        /* Read update commands from standard input */
        if (isatty(STDIN_FILENO)) {
                tputs(T("Reading update commands from standard input..."));
+               recommend_man_page(T("update"));
        }
        cmd_file_contents = stdin_get_text_contents(&cmd_file_nchars);
        if (!cmd_file_contents) {
@@ -3149,6 +3150,7 @@ usage(int cmd_type)
        tprintf(T("Usage:\n%"TS), usage_strings[cmd_type]);
        for_imagex_command(cmd) {
                if (cmd->cmd == cmd_type) {
+                       tputc(T('\n'), stdout);
                        recommend_man_page(cmd->name);
                }
        }