Skip to content

Commit 7e79074

Browse files
author
shixuantong
committed
update --rm help info
Starting from cee6bec, --rm is ignored when the output is `stdout`.
1 parent f9938c2 commit 7e79074

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

programs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Usage: zstd [OPTIONS...] [INPUT... | -] [-o OUTPUT]
153153
Options:
154154
-o OUTPUT Write output to a single file, OUTPUT.
155155
-k, --keep Preserve INPUT file(s). [Default]
156-
--rm Remove INPUT file(s) after successful (de)compression.
156+
--rm Remove INPUT file(s) after successful (de)compression. Ignoring `--rm` command when the output is `stdout`.
157157
158158
-# Desired compression level, where `#` is a number between 1 and 19;
159159
lower numbers provide faster compression, higher numbers yield

programs/zstdcli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static void usage(FILE* f, const char* programName)
147147
DISPLAY_F(f, "Options:\n");
148148
DISPLAY_F(f, " -o OUTPUT Write output to a single file, OUTPUT.\n");
149149
DISPLAY_F(f, " -k, --keep Preserve INPUT file(s). [Default] \n");
150-
DISPLAY_F(f, " --rm Remove INPUT file(s) after successful (de)compression.\n");
150+
DISPLAY_F(f, " --rm Remove INPUT file(s) after successful (de)compression. Ignoring `--rm` command when the output is `stdout`.\n");
151151
#ifdef ZSTD_GZCOMPRESS
152152
if (exeNameMatch(programName, ZSTD_GZ)) { /* behave like gzip */
153153
DISPLAY_F(f, " -n, --no-name Do not store original filename when compressing.\n\n");

tests/cli-tests/basic/help.sh.stdout.glob

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Usage: zstd *OPTIONS...* *INPUT... | -* *-o OUTPUT*
66
Options:
77
-o OUTPUT Write output to a single file, OUTPUT.
88
-k, --keep Preserve INPUT file(s). *Default*
9-
--rm Remove INPUT file(s) after successful (de)compression.
9+
--rm Remove INPUT file(s) after successful (de)compression. Ignoring `--rm` command when the output is `stdout`.
1010

1111
-# Desired compression level, where `#` is a number between 1 and 19;
1212
lower numbers provide faster compression, higher numbers yield

0 commit comments

Comments
 (0)