On Sat, Jul 8, 2023 at 7:28 AM Pádraig Brady <P@draigbrady.com> wrote:
It would be nice to be able to support users who want to replace all
the *sum utilities with a script that did:
exec cksum -a <algo> --untagged "$@"
To that end, it would be good to support all the options of the older utils.
This is a bit awkward with --base64 added in the last few months, as that
also added the short -b option. However it's only a few months released,
so it's probably not too onerous to change.
The attached makes the change, which I'll augment with NEWS and tests/ upon
agreement.
Good idea. I agree that the added value outweighs the cost of
divergence with OpenBSD cksum's -b (https://man.openbsd.org/cksum.1)
One nit: the in-comment reference to -b needs to say --base64, too (in
tests/cksum/cksum-base64.pl):
# Ensure that each of the above works with -b:
(map {my ($h,$v)= @$_; my $o=fmt $h,$v;
- [$h, "-ba $h", {IN=>{f=>''}}, {OUT=>"$o\n"}]} @pairs),
+ [$h, "--base64 -a $h", {IN=>{f=>''}}, {OUT=>"$o\n"}]} @pairs),