i am looking for a commandline parsing library tha...
# announcements
n
i am looking for a commandline parsing library that supports sub commands and is not hardcoded to println() everything idally i want to pass a custom logger to it, but the frameworks i looked at so far did not have the capability for that also subcommands and not killing the app on failure would be nice (looking at clickt) does anyone know which commandline parsers might cover at least some of those features ?
k
n
first question about jcommander, do i have to pass it a array or cna it do the shell splitting of
arg1 "arg 2"
by itself ?
i am guessing i will need a extra lib or regex for that
k
You literally just pass it the
Array<String>
you get in main.
n
but i do not intend to process that, but messages i get from a chat bridge
which is why i need graceful error handling and the ability to respond with the error message in the correct channel and not in stdout
i hope jcommander can do this
k
Why do you give it a quick shot?
The things that print to stdout in JCommander have extra parameter variants where you can pass in your own streams to write to, and parsing errors are handled with exceptions so just catch those.
n
that would work
does it support sucommands? so far i found nothing mentioning it in the docs
n
thats what i was looking for , nice