]> git.ipfire.org Git - thirdparty/zstd.git/commit
Allow Invoking `zstd --list` When `stdin` is not a `tty`
authorW. Felix Handte <w@felixhandte.com>
Fri, 29 Jun 2018 19:33:44 +0000 (15:33 -0400)
committerW. Felix Handte <w@felixhandte.com>
Fri, 29 Jun 2018 19:33:44 +0000 (15:33 -0400)
commit712a9fd9721c314f4b0238577d803b012845f6d2
treef450a6fdbc3a05a548927b6f1acd7ed4f3caa6dc
parenta2c3a4cd0e9bfdd731c2518ebcb32157052c4a81
Allow Invoking `zstd --list` When `stdin` is not a `tty`

Also now returns an error when no inputs are given.

New proposed behavior:

```
felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l; echo $?
No files given
1
felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst; echo $?
Frames  Skips  Compressed  Uncompressed  Ratio  Check  Filename
     1      0     3.08 KB      10.92 KB  3.544  XXH64  Makefile.zst
0
felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l <Makefile.zst; echo $?
zstd: --list does not support reading from standard input
No files given
1
felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst <Makefile.zst; echo $?
Frames  Skips  Compressed  Uncompressed  Ratio  Check  Filename
     1      0     3.08 KB      10.92 KB  3.544  XXH64  Makefile.zst
0
felix@odin:~/prog/zstd (list-stdin-check)$
```
programs/fileio.c