From 93583e645f4f173dd9af32e678c2ec6c85a121ae Mon Sep 17 00:00:00 2001 From: Yorhel <git@yorhel.nl> Date: Sun, 16 Dec 2018 10:47:51 +0100 Subject: [PATCH] Add --help flag as alias for -h https://dev.yorhel.nl/ncdu/bug/125 --- doc/ncdu.pod | 2 +- src/main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ncdu.pod b/doc/ncdu.pod index bf8b136..2946c3d 100644 --- a/doc/ncdu.pod +++ b/doc/ncdu.pod @@ -20,7 +20,7 @@ provides a fast way to see what directories are using your disk space. =over -=item -h +=item -h, --help Print a short help message and quit. diff --git a/src/main.c b/src/main.c index b1f79e5..c71afc2 100644 --- a/src/main.c +++ b/src/main.c @@ -119,7 +119,7 @@ static void argv_parse(int argc, char **argv) { char *dir = NULL; static yopt_opt_t opts[] = { - { 'h', 0, "-h,-?" }, + { 'h', 0, "-h,-?,--help" }, { 'q', 0, "-q" }, { 'v', 0, "-v,-V,--version" }, { 'x', 0, "-x" }, @@ -148,7 +148,7 @@ static void argv_parse(int argc, char **argv) { case 0 : dir = val; break; case 'h': printf("ncdu <options> <directory>\n\n"); - printf(" -h This help message\n"); + printf(" -h,--help This help message\n"); printf(" -q Quiet mode, refresh interval 2 seconds\n"); printf(" -v,-V,--version Print version\n"); printf(" -x Same filesystem\n"); -- GitLab