Open rvesse opened 5 years ago
Concrete tasks:
@PositionalArgument
annotationPositionalArgumentMetadata
to hold the metadata for a positional argumentCommandMetadata
with positional arguments supportAbstractCommandParser
with positional arguments supportArgumentMetadata
ArgumentsRestriction
extended to work with positional arguments as well
Moved out to 2.8
Moved to 3.x branch
Hey @rvesse ,
I'm working on integrating Airline into Quarkus GitHub App (it's a framework used to develop GitHub Apps) to parse commands included in GitHub comments (basically to have a comment-based commands bot).
This @PositionalArgument
feature is THE missing feature I would need to make things completely smooth.
Anything I can do to help make it happen? AFAICS, you have made a lot of progress on this already.
And btw, a good opportunity to thank you for your work on this: it was exactly what I was looking for and it's flexible enough to meet my requirement even if it's not the typical use case of this library.
Hey @gsmet,
So the core implementation was done a long time ago as the commits show, this was being done in aid of $dayjob usage of this library but priorities changed and we never ended up adopting this feature so it didn't get finished up. I would really like to finish it and get a 3.x release out at some point.
The main areas of this feature that need finishing are:
There are Alpha builds available via https://central.sonatype.org/publish/publish-guide/#accessing-repositories if you want to experiment with it in your project. Note Airline counts as a legacy project so you'll need to use the older oss.sonatype.org
URLs. Most recent Alpha version is 3.0.0-alpha-2-SNAPSHOT
Currently
@Arguments
is a general annotation that can only be applied to a single field and collects all non-option values into that field. There are various use cases where it might be nicer to support true positional arguments i.e. a new@PositionalArgument
annotation such that arguments could be captured on separate fields and provide more detailed help specific to each argumente.g.
Which would be used as follows:
Where
source.txt
would be set to thesource
field,target.txt
set to thetarget
field and the additional arguments passed to theextraArgs
field