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)
committerAlexandre Mestiashvili <mestia@debian.org>
Tue, 21 Aug 2018 15:32:44 +0000 (16:32 +0100)
commita4c535cc04bc5bd67806c2e94f7408180307cb41
tree0819745d45b0861ecd658fc70c6e19e7c31b5070
parent6dadf7577064aa4c4348c02e4d668911bee52f46
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)$
```

Gbp-Pq: Name 0001-Allow-Invoking-zstd-list-When-stdin-is-not-a-tty.patch
programs/fileio.c