sharkdp / hexyl

A command-line hex viewer
Apache License 2.0
8.92k stars 227 forks source link

Argument `--block-size=0` should be considered an error. #110

Closed eth-p closed 3 years ago

eth-p commented 3 years ago

Using --length=16block with --block-size=0 is the same thing as doing --length=0, and it doesn't make much sense to do intentionally.

Related: #106


Note: I'm doing a class assignment regarding creating tests (from scratch) for an open-source command line program, and I chose hexyl for it. You might have a couple more of these on the way, depending on what the assignment brings to light :)

sharkdp commented 3 years ago

Thanks. We should disallow block sizes of 0.