X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=dus.git;a=blobdiff_plain;f=dus.c;h=4acc5173a3a4dabc972ee520250eb38977e26b8e;hp=6557c7fef523b42feb08f4fb51e02c48535d7a1c;hb=3095e1570e1f1d4edf264b07480c256a2691b43c;hpb=dd928a1f7b28d3680a5ecdcfcefddcec657f3adb diff --git a/dus.c b/dus.c index 6557c7f..4acc517 100644 --- a/dus.c +++ b/dus.c @@ -385,7 +385,8 @@ void usage(FILE *out) { 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.\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"); fprintf(out, "\n"); fprintf(out, "Report bugs and comments to .\n"); } @@ -393,6 +394,7 @@ void usage(FILE *out) { /**********************************************************************/ static struct option long_options[] = { + { "version", no_argument, 0, 'v' }, { "ignore-dots", no_argument, 0, 'd' }, { "reverse-order", no_argument, 0, 'r' }, { "show-top", no_argument, 0, 't' }, @@ -413,10 +415,15 @@ int main(int argc, char **argv) { setlocale (LC_ALL, ""); - while ((c = getopt_long(argc, argv, "dfrtl:c:m:hd", + while ((c = getopt_long(argc, argv, "vdfrtl:c:m:hd", long_options, NULL)) != -1) { switch (c) { + case 'v': + printf("dus version %s (%s)\n", VERSION_NUMBER, UNAME); + exit(EXIT_SUCCESS); + break; + case 'd': ignore_dotfiles = 1; break;