spring-shell
spring-shell copied to clipboard
Support long option with single dash
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.
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.