Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xxhsum improved help #993

Merged
merged 6 commits into from
Jan 21, 2025
Merged

Xxhsum improved help #993

merged 6 commits into from
Jan 21, 2025

Conversation

walterdejong
Copy link

@walterdejong walterdejong commented Jan 2, 2025

some fixes to the help message for xxhsum

  • show help message for option --files-from (it was undocumented)
  • align the help under "Options" with the column under "Advanced"

@Cyan4973 Cyan4973 self-assigned this Jan 2, 2025
@Cyan4973
Copy link
Owner

Cyan4973 commented Jan 2, 2025

I like the proposed update.
But the following statement :

the program treats no filename as an error (XSUM_badusage) so the original help message was incorrect.

looks incorrect to me.

for example :

echo hello | xxhsum
e4c191d091bd8853  stdin

as one can see, no input is provided, so xxhsum uses stdin.

Not to be confused with :

xxhsum
Wrong parameters

In this case, there isn't even a stdin, so it fails.

@walterdejong
Copy link
Author

I was talking about this behavior:

$ ./xxhsum --files-from
Wrong parameters

xxhsum 0.8.3 by Yann Collet 
Create or verify checksums using fast non-cryptographic algorithm xxHash 

Usage: xxhsum [options] [files] 

When no filename provided or when '-' is provided, uses stdin as input. 

@Cyan4973
Copy link
Owner

Cyan4973 commented Jan 2, 2025

It also works :

echo README.md | xxhsum --files-from
021486ed356c9bbc  README.md

or even:

ls | xxhsum --files-from

b250f752fe46f746  appveyor.yml
1e31975f81f9b9cc  CHANGELOG
1672809750935c3b  Doxyfile
fabee07a1ea250e5  Doxyfile-internal
a14d327d280a4f5d  libxxhash.a
c0c8b0b129cdb72d  libxxhash.pc.in
f2738649c137765d  libxxhash.so
f2738649c137765d  libxxhash.so.0
f2738649c137765d  libxxhash.so.0.8.3
4a2ace65fa00bd3e  LICENSE
c5f936d59e9edff2  Makefile
021486ed356c9bbc  README.md
(...)

Same idea here :

xxhsum --files-from
Wrong parameters

fails because there isn't any input at all, not even stdin.

@walterdejong
Copy link
Author

Aha, I see your reasoning.

@Cyan4973 Cyan4973 merged commit 1bf7bc4 into Cyan4973:dev Jan 21, 2025
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants