mirror of
https://github.com/facebook/zstd.git
synced 2025-10-09 00:05:28 -04:00
Merge pull request #1179 from supertopher/dev
Improves UX for --list command's lack of support for pipes
This commit is contained in:
commit
c0b6ce95b1
@ -2030,6 +2030,12 @@ static int FIO_listFile(fileInfo_t* total, const char* inFileName, int displayLe
|
|||||||
}
|
}
|
||||||
|
|
||||||
int FIO_listMultipleFiles(unsigned numFiles, const char** filenameTable, int displayLevel){
|
int FIO_listMultipleFiles(unsigned numFiles, const char** filenameTable, int displayLevel){
|
||||||
|
|
||||||
|
if (!IS_CONSOLE(stdin)) {
|
||||||
|
DISPLAYOUT("zstd: --list does not support reading from standard input\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (numFiles == 0) {
|
if (numFiles == 0) {
|
||||||
DISPLAYOUT("No files given\n");
|
DISPLAYOUT("No files given\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -730,6 +730,9 @@ $ECHO "\n===> zstd --list/-l error detection tests "
|
|||||||
! $ZSTD -lv tmp1*
|
! $ZSTD -lv tmp1*
|
||||||
! $ZSTD --list -v tmp2 tmp12.zst
|
! $ZSTD --list -v tmp2 tmp12.zst
|
||||||
|
|
||||||
|
$ECHO "\n===> zstd --list/-l exits 1 when stdin is piped in"
|
||||||
|
! echo "piped STDIN" | $ZSTD --list
|
||||||
|
|
||||||
$ECHO "\n===> zstd --list/-l test with null files "
|
$ECHO "\n===> zstd --list/-l test with null files "
|
||||||
./datagen -g0 > tmp5
|
./datagen -g0 > tmp5
|
||||||
$ZSTD tmp5
|
$ZSTD tmp5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user