diff --git a/man/tldr.1 b/man/tldr.1 index 8ee0e0a..bb8ffd4 100644 --- a/man/tldr.1 +++ b/man/tldr.1 @@ -14,9 +14,6 @@ used commandline tools. .BR \-v ", " \-\-verbose verbose output (when used with \fB\-c\fR or \fB\-u\fR) .TP -.BR \-v ", " \-\-version -output version information and exit -.TP .BR \-h ", " \-\-help display help and exit .TP @@ -44,6 +41,8 @@ show command page for OSX .B \-\-sunos show command page for SunOS .TP +.B \-\-version +output version information and exit .SH EXIT STATUS 0 on success, any other positive value otherwise .SH SEE ALSO diff --git a/src/tldr.c b/src/tldr.c index eba8498..8acc399 100644 --- a/src/tldr.c +++ b/src/tldr.c @@ -138,7 +138,7 @@ main(int argc, char **argv) return EXIT_SUCCESS; } if (verbose_flag && optind >= argc) { - print_version(argv[0]); + print_usage(argv[0]); return EXIT_SUCCESS; } if (list_flag) { @@ -210,7 +210,6 @@ print_usage(char const *arg) fprintf(stdout, out, arg); fprintf(stdout, "available commands:\n"); fprintf(stdout, " %-23s %s\n", "-v, --verbose", "verbose output (when used with -c or -u)"); - fprintf(stdout, " %-23s %s\n", "-v, --version", "print version and exit"); fprintf(stdout, " %-23s %s\n", "-h, --help", "print this help and exit"); fprintf(stdout, " %-23s %s\n", "-u, --update", "update local database"); fprintf(stdout, " %-23s %s\n", "-c, --clear-cache", "clear local database"); @@ -222,6 +221,7 @@ print_usage(char const *arg) fprintf(stdout, " %-23s %s\n", "--linux", "show command page for Linux"); fprintf(stdout, " %-23s %s\n", "--osx", "show command page for OSX"); fprintf(stdout, " %-23s %s\n", "--sunos", "show command page for SunOS"); + fprintf(stdout, " %-23s %s\n", "--version", "print version and exit"); /* *INDENT-ON* */ }