metal3d / bashsimplecurses

A simple curses library made in bash to draw terminal interfaces
BSD 3-Clause "New" or "Revised" License
921 stars 115 forks source link

Input boxes/text fields? #30

Closed Stratus3D closed 6 years ago

Stratus3D commented 6 years ago

I have a simple program I'm building that shows windows, one displays the contents of a file (JSON), and the other displaying the results of a transformation of that JSON (a JQ command). I need an input box somewhere on the screen so the user can dynamically edit the JQ query. I don't see anything in the code that handles input, and my naive approaches with read caused big problems with the windows.

Any suggestions on how to approach this? I'd be happy to create a PR if I knew what was needed to make this possible.

metal3d commented 6 years ago

Unfortunatly, bash simple curses is a "read only" interface and I don't plan to make that kind of widget. But If you've got any idea on how to make that possible, so I can take a look.

Stratus3D commented 6 years ago

Sorry, I don't have any idea how to add support for input fields to this library. Great little library though!

metal3d commented 6 years ago

Yeah, I recommand to use "dialog", or "whiptail" that are made for this