summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-12-16 10:47:51 +0100
committerYorhel <git@yorhel.nl>2018-12-16 10:47:51 +0100
commit93583e645f4f173dd9af32e678c2ec6c85a121ae (patch)
treed2ad453be8819d92bd6e7e3df46168ce90f4e18f
parentbf8068b65ebdc85770fa8b8eb713c3fe3b2aae4a (diff)
Add --help flag as alias for -h
https://dev.yorhel.nl/ncdu/bug/125
-rw-r--r--doc/ncdu.pod2
-rw-r--r--src/main.c4
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");