You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be interesting to try and maintain some level of compatibility with xxd. I recently came across this when following a blog post, trying to use hexyl instead of xxd.
The most obvious thing would be to introduce (yet another) alias for --length/--bytes, i.e. -l in addition to -n and -c.
What other flags/options could we try to support or try to provide aliases for?
What we're definitely not going to support is long single-dash options like -groupsize. Instead, we are always going to keep a style where long options come with two dashes --groupsize.
By the way, one thing that we already do better:
Even though xxd itself doesn't support hexadecimal notation […]
So instead of xxd -s $((0x2118)) ./hello we can simply say hexyl -s 0x2118 ./hello.
Note: we already try to be (partially) compatible with hexdump.
Reacted by Valko Volodya, Fabian, Yuri Dias, Bruno Heridet and Martin Lindhe
We now have a new --group-bytes option in hexyl which is basically the same as xxds -groupsize (?). @RinHizakura why did we call it like that.. and not --groupsize or at least --group-size?
It is basically the same as -groupsize in xxd. Since I didn't aware of the requirement of compatibility, so the naming didn't align with xxd at that time. I think you could change --group-bytes to --groupsize directly if you like it.
I see, thanks. I believe we should change it to --groupsize then. At least as an alias. But I don't really see a reason to choose group-bytes over groupsize, if we can get xxd-compatibility this easy.
That is indeed pretty cool. This would be a major new feature and I don't currently plan on adding it to hexyl. I think it's fair to close this for now.
Activity
[-]Compatibility with xxd?[/-][+](Partial) compatibility with xxd?[/+]martinlindhe commentedon Jan 24, 2022
Another xxd feature that I find is most lacking is -r (reverse hexdump).
Using it you can convert a hexdump into a binary, like this:
sharkdp commentedon Dec 5, 2022
We now have a new
--group-bytesoption inhexylwhich is basically the same asxxds-groupsize(?). @RinHizakura why did we call it like that.. and not--groupsizeor at least--group-size?RinHizakura commentedon Dec 6, 2022
It is basically the same as
-groupsizeinxxd. Since I didn't aware of the requirement of compatibility, so the naming didn't align withxxdat that time. I think you could change--group-bytesto--groupsizedirectly if you like it.sharkdp commentedon Dec 6, 2022
I see, thanks. I believe we should change it to
--groupsizethen. At least as an alias. But I don't really see a reason to choose group-bytes over groupsize, if we can get xxd-compatibility this easy.Renme --group-bytes to --group-size
sharkdp commentedon Dec 7, 2022
Fixed in 1df35ee.
That is indeed pretty cool. This would be a major new feature and I don't currently plan on adding it to
hexyl. I think it's fair to close this for now.