Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using options in Apache Commons CLI without hyphen

Is there a proper way of handling options using Apache Commons CLI without a hyphen? So instead of entering "-help" a normal "help" should also work? Or is this not possible/intended because an option would be no longer distinguishable from an argument?

like image 491
mgrstnr Avatar asked Dec 20 '25 16:12

mgrstnr


1 Answers

Or is this not possible/intended because an option would be no longer distinguishable from an argument?

Absolutely, that's the reason. And all the libraries I know use the hyphen.

like image 174
n1r3 Avatar answered Dec 22 '25 06:12

n1r3



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!