-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3850 from KapJI/better-errors
cli: better errors on argument parsing
- Loading branch information
Showing
4 changed files
with
66 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
println "+ zstd --blah" >&2 | ||
zstd --blah | ||
println "+ zstd -xz" >&2 | ||
zstd -xz | ||
println "+ zstd --adapt=min=1,maxx=2 file.txt" >&2 | ||
zstd --adapt=min=1,maxx=2 file.txt | ||
println "+ zstd --train-cover=k=48,d=8,steps32 file.txt" >&2 | ||
zstd --train-cover=k=48,d=8,steps32 file.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
+ zstd --blah | ||
Incorrect parameter: --blah | ||
... | ||
Usage: zstd * | ||
|
||
Options: | ||
... | ||
+ zstd -xz | ||
Incorrect parameter: -x | ||
... | ||
Usage: zstd * | ||
|
||
Options: | ||
... | ||
+ zstd --adapt=min=1,maxx=2 file.txt | ||
Incorrect parameter: --adapt=min=1,maxx=2 | ||
... | ||
Usage: zstd * | ||
|
||
Options: | ||
... | ||
+ zstd --train-cover=k=48,d=8,steps32 file.txt | ||
Incorrect parameter: --train-cover=k=48,d=8,steps32 | ||
... | ||
Usage: zstd * | ||
|
||
Options: | ||
... |