summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2016-11-13 01:21:29 (GMT)
committerYann Collet <cyan@fb.com>2016-11-13 01:21:29 (GMT)
commitf42130ee44d47105c9d86064b3f68d10af6a10f5 (patch)
treeda3a604db0b35dc7b71c80a277921049094d992d /programs
parent84b97f90b81195590700fb791b83165d9e8cc1cd (diff)
downloadlz4-f42130ee44d47105c9d86064b3f68d10af6a10f5.zip
lz4-f42130ee44d47105c9d86064b3f68d10af6a10f5.tar.gz
lz4-f42130ee44d47105c9d86064b3f68d10af6a10f5.tar.bz2
cli : add --help command
Diffstat (limited to 'programs')
-rw-r--r--programs/lz4.12
-rw-r--r--programs/lz4cli.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/programs/lz4.1 b/programs/lz4.1
index 1d9238d..434b131 100644
--- a/programs/lz4.1
+++ b/programs/lz4.1
@@ -217,7 +217,7 @@ hence for a file. It won't work with unknown source size, such as stdin or pipe.
.BR \-q ", " --quiet
suppress warnings and real-time statistics; specify twice to suppress errors too
.TP
-.B \-h/\-H
+.B \-h/\-H ", " --help
display help/long help and exit
.TP
.BR \-V ", " \--version
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index 1f25a21..d291a27 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -353,6 +353,7 @@ int main(int argc, const char** argv)
if (!strcmp(argument, "--version")) { DISPLAY(WELCOME_MESSAGE); return 0; }
if (!strcmp(argument, "--keep")) { LZ4IO_setRemoveSrcFile(0); continue; } /* keep source file (default) */
if (!strcmp(argument, "--rm")) { LZ4IO_setRemoveSrcFile(1); continue; }
+ if (!strcmp(argument, "--help")) { usage_advanced(exeName); goto _cleanup; }
}
while (argument[1]!=0) {