mookid / diffr

Yet another diff highlighting tool
MIT License
572 stars 22 forks source link

Cleanups and fixes to command parsing #84

Open Hi-Angel opened 1 year ago

Hi-Angel commented 1 year ago

Refactoring aside, this fixes the problem when --color-numbers was followed by another option, such as for example diffr --line-numbers --help. Such combination of parameters would cause an error before this PR.

Hi-Angel commented 1 year ago

upd: didn't know there are single-dash options like -h, added their handling as well

mookid commented 1 year ago

please consider adding a test if you fix a bug to avoid regression. thanks!

Hi-Angel commented 1 year ago

Anyway, done.

Hi-Angel commented 1 year ago

Note that there are two warnings now. I'm not sure I'm a fan of that kind of consistency, but you are the maintainer, so here it is.