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

Does Jline Support select-option based control on terminal #592

Closed
vsaji opened this issue Oct 19, 2020 · 4 comments
Closed

Does Jline Support select-option based control on terminal #592

vsaji opened this issue Oct 19, 2020 · 4 comments
Labels

Comments

@vsaji
Copy link

vsaji commented Oct 19, 2020

Sorry, if this topic has been discussed here earlier.

I am working on picocli+jline project whereby I have a requirement to show a list of values and ask the user to select one of them and use that value further.

Something similar you see it in this gif. This is supported in nodejs based CLI app, but I am wondering if this can be achieved in JLine.
https://miro.medium.com/max/640/1*rY1AAM3lhu7e67PuzW0s_Q.gif

Kindly advice.

@vsaji vsaji changed the title Does Jline Support selection-option based control on terminal Does Jline Support select-option based control on terminal Oct 19, 2020
@mattirn
Copy link
Collaborator

mattirn commented Oct 22, 2020

No, JLine does not have built-in support for select-option.

mattirn added a commit that referenced this issue Oct 23, 2020
@mattirn
Copy link
Collaborator

mattirn commented Oct 23, 2020

@vsaji, I have added in Example an implementation of select-option based control. Take a look if it could be useful in your project.

@PavelTurk
Copy link

@mattirn I am also looking for a select option for jline. I've checked your example. Thank you for sharing your solution. However, it is difficult to use in real situation because jumping from one screen to another is not good. I think it is necessary to modify it at something like this

@mattirn
Copy link
Collaborator

mattirn commented Mar 14, 2022

@PashaTurok take a look my pull request Upgrade JLine to 3.19.0 awegmann/consoleui#24, that's much better than the example I have added in JLine.

@gnodet gnodet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants