spring-shell icon indicating copy to clipboard operation
spring-shell copied to clipboard

Support long option with single dash

Open jvalkeal opened this issue 2 years ago • 1 comments

In 2.0.x it was possible to use -arg while rework in 2.1.x focused making separation between short/long options. Programmatic builder interface only takes characters with short options while @ShellOption don't have this separation. Essentially using -arg with @ShellOption don't do anything and what is confusing is that it doesn't warn or error.

This type of support however opens other issues like what should happen if user is mixing short options -a, -r and -g as with posix style -arg combines those together. While we could map -arg to an option first and then check posix short styles, but what about if you use -gra? Having options -a, -r, -g and -arg creates confusing behaviour as -arg and -gra would have different meaning.

jvalkeal avatar Jul 28 '22 09:07 jvalkeal

Still keeping this in a backlog as work for #646 is starting. As new parser is supposed to be more flexible and configurable there is a change that these type of things could be done with it.

jvalkeal avatar Jan 27 '23 13:01 jvalkeal