You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Merge ConsoleUI to provide interactive menusΒ #841
Nice, thanks. Does this attempt things like https://www.npmjs.com/package/inquirer, meaning, arrow key navigable select/multi-select?
I've tried about half a dozen java libs and they all end up just being "menus" that select by means of typing in the option letter/num.
I'm pretty confused right now, can someone point me in the right direction on (preferably) an explanation on how to do these sorts of things? As I understand, JLine is capable of reading UP, DOWN, and such keystrokes, I just cannot for the life of me get it to work!
My superficial understanding is that the JLine library does not handle single keystrokes but you can add a layer that will respond that way. I think the second comment above demonstrates how to do that in the links. Still looking.
I'm actually writing a piece for InfoWorld on JLine, and I was hoping to include some fancy menu handling but I think I'll just go with entering text and hitting the enter key.
So, to clear everything up: JLine doesn't provide this functionality on its own. Why did #24 never get merged?
That's not for us to answer. I suppose the project is not maintained anymore... However, if there's a will and if @awegmann is ok, we could merge ConsoleUI into a new JLine module and shut down the ConsoleUI project.
Hi everybody. Mea culpa. ConsoleUI is not really maintained anymore from my side. I would be pleased, if the project can live directly with JLine.
When I started ConsoleUI using JLine2 was the way to go, but the way I caught the keystrokes also felt a bit awkward. I knew, that JLine was not designed to allow this kind of usage.
Which jline3 this part of the code also had to be changed. If ConsoleUI were a part of JLine, the integration would benefit.
To answer your question, Guillaume: yes, I would like ConsoleUI to live its life in your project.
Hi everybody. Mea culpa. ConsoleUI is not really maintained anymore from my side. I would be pleased, if the project can live directly with JLine. When I started ConsoleUI using JLine2 was the way to got, but the way I caught the keystrokes also felt a bit awkward. I knew, that JLine was not designed to allow this kind of usage. Which jline3 this part of the code also had to be changed. If ConsoleUI were a part of JLine, the integration would benefit. To answer your question, Guillaume: yes, I would like ConsoleUI to live its life in your project.
Ok, thx for the quick reply !
@mattirn@lutzseverino do you want to take a look at creating a PR to merge ConsoleUI into JLine in a new module ?
Activity
mattirn commentedon Apr 22, 2023
Yes, you can do it also in java... See #592 and my old pull request Upgrade JLine to 3.19.0 awegmann/consoleui#24, which IMHO is working pretty well.
MTyson commentedon Apr 22, 2023
Nice, thanks. Does this attempt things like https://www.npmjs.com/package/inquirer, meaning, arrow key navigable select/multi-select?
I've tried about half a dozen java libs and they all end up just being "menus" that select by means of typing in the option letter/num.
MTyson commentedon Apr 22, 2023
It looks like it does indeed. What is the quickest path to take from a vanilla JLine app to an app that can offer interactive menu prompts?
lutzseverino commentedon Apr 22, 2023
I'm pretty confused right now, can someone point me in the right direction on (preferably) an explanation on how to do these sorts of things? As I understand, JLine is capable of reading UP, DOWN, and such keystrokes, I just cannot for the life of me get it to work!
MTyson commentedon Apr 22, 2023
My superficial understanding is that the JLine library does not handle single keystrokes but you can add a layer that will respond that way. I think the second comment above demonstrates how to do that in the links. Still looking.
MTyson commentedon Apr 22, 2023
I'm actually writing a piece for InfoWorld on JLine, and I was hoping to include some fancy menu handling but I think I'll just go with entering text and hitting the enter key.
MTyson commentedon Apr 22, 2023
I just got to look at ConsoleUI - it does exactly what we want. Thanks @mattirn @awegmann.
lutzseverino commentedon Jan 18, 2024
So, to clear everything up: JLine doesn't provide this functionality on its own. Why did #24 never get merged?
gnodet commentedon Jan 18, 2024
That's not for us to answer. I suppose the project is not maintained anymore... However, if there's a will and if @awegmann is ok, we could merge ConsoleUI into a new JLine module and shut down the ConsoleUI project.
awegmann commentedon Jan 18, 2024
Hi everybody. Mea culpa. ConsoleUI is not really maintained anymore from my side. I would be pleased, if the project can live directly with JLine.
When I started ConsoleUI using JLine2 was the way to go, but the way I caught the keystrokes also felt a bit awkward. I knew, that JLine was not designed to allow this kind of usage.
Which jline3 this part of the code also had to be changed. If ConsoleUI were a part of JLine, the integration would benefit.
To answer your question, Guillaume: yes, I would like ConsoleUI to live its life in your project.
gnodet commentedon Jan 18, 2024
Ok, thx for the quick reply !
@mattirn @lutzseverino do you want to take a look at creating a PR to merge ConsoleUI into JLine in a new module ?
mattirn commentedon Jan 19, 2024
Ok, I can do a PR.
[-]Interactive menus: possible?[/-][+]Merge ConsoleUI to provide interactive menus[/+]Merge pull request jline#935 from gnodet/merge-consoleui