Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cooperation with picocli project #349

Closed
remkop opened this issue Jan 25, 2019 · 1 comment
Closed

Cooperation with picocli project #349

remkop opened this issue Jan 25, 2019 · 1 comment

Comments

@remkop
Copy link

remkop commented Jan 25, 2019

Dear JLine maintainers,

I wonder if you would be interested in some form of cooperation with the picocli project. I believe JLine and picocli are a perfect match for users developing interactive shell applications with some set of commands, where each command may have options, positional parameters and subcommands.

As an example of what is possible, Picocli currently has these modules:

These modules have a PicocliJLineCompleter that show context-sensitive completion candidates for options, option parameters and subcommands of a set of picocli commands. (The readme of each module has an example.) Applications that use picocli to define their commands no longer need to hand-code Completers for their commands and options. (An early version of this is used in the Micronaut CLI.)

This is nice, but looking at #254 , I realize that much more is possible. I love that demo and I would love to hook it into what picocli can offer!

The picocli object model is quite rich. It can provide all the details displayed in the status bar. For example, it can generate a command synopsis, and provide descriptions for a command and its options, using ANSI colors. When the demo shows a dropdown with multiple subcommands or options, the status bar could query the picocli object model to show the description for all completion candidates, which would help users select the desired option.

But this is just one idea. I am sure there are many ways in which JLine and picocli can be combined to create interesting functionality.

Please let me know if this sounds interesting.

Remko

@gnodet
Copy link
Member

gnodet commented Jan 28, 2019

This is certainly very interesting. Investigating picocli is actually on my todo list because I saw you already support Substrate VM (https://picocli.info/picocli-on-graalvm.html). That's definitely something I'd like to try with JLine 3, though not sure how well we can run on Substrate VM, since JLine does fancy things (using either external processes or jni...).

Fwiw, #254 is not JLine powered, but that would be a goal, if time permits.

Anyway, I don't have much free time atm, but that's definitely on my todo list !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants