pixel / hexedit

View and edit files in hexadecimal or in ASCII
http://rigaux.org/hexedit.html
GNU General Public License v2.0
96 stars 39 forks source link

Commandline parsing should be as order-agnostic as reasonably possible #70

Open bradenbest opened 1 month ago

bradenbest commented 1 month ago

hexedit filename -l 16 is not valid and results in a usage exit, but hexedit -l 16 filename is valid. I can see in the manpage and usage printout as well that the program expects the filename to come last, and it doesn't have to be this way.

I'll see if I can't fix these issues myself. I'd frankly like to rewrite the whole arg parser loop (no disrespect), but let's address one thing at a time.

bradenbest commented 1 month ago

I'd frankly like to rewrite the whole arg parser loop

I ended up doing exactly that. If you decide to merge #71 it should automatically close this issue 👍