From: Francois Fleuret Date: Wed, 11 Aug 2010 11:08:36 +0000 (+0200) Subject: Added the -v option in the help and the man page. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=2106033257340732a6703f6405dc97a08311e6f7;p=dus.git Added the -v option in the help and the man page. --- diff --git a/dus.1 b/dus.1 index 394f722..173783f 100644 --- a/dus.1 +++ b/dus.1 @@ -24,7 +24,10 @@ as default. .SH "OPTIONS" .TP \fB-h\fR, \fB--help\fR -display help and exit +print the help and exit +.TP +\fB-v\fR, \fB--version\fR +print the version number and exit .TP \fB-d\fR, \fB--ignore-dots\fR ignore files and directories whose name starts with a dot diff --git a/dus.c b/dus.c index 4acc517..336f201 100644 --- a/dus.c +++ b/dus.c @@ -371,6 +371,8 @@ void usage(FILE *out) { fprintf(out, "Lists files and directories according to their size. The sizes are computed by summing recursively exact file sizes through directories. If a given directory has its name appended with '/', it is not listed, but the elements it contains are. If no files or directories are provided as arguments, the current directory is used as default.\n"); fprintf(out, "\n"); /* 01234567890123456789012345678901234567890123456789012345678901234567890123456789*/ + fprintf(out, " -h, --help show this help.\n"); + fprintf(out, " -v, --version prints the version number and exit\n"); fprintf(out, " -d, --ignore-dots ignore files and directories starting with a '.'\n"); fprintf(out, " -f, --fancy display size with float values and K, M and G\n"); fprintf(out, " units.\n"); @@ -383,7 +385,6 @@ void usage(FILE *out) { fprintf(out, " if the stdout is not a tty.\n"); fprintf(out, " -l , --nb-lines \n"); fprintf(out, " same as -c for number of lines.\n"); - fprintf(out, " -h, --help show this help.\n"); fprintf(out, " -m , --size-min \n"); fprintf(out, " set the listed entries minimum size. The size\n"); fprintf(out, " can be specified using the G, M, K, and B units.\n");