1

How to do a textbox in terminal ruby applications? Is there a gem for this or it can be done using pure ruby.

pankajdoharey
  • 1,562
  • 19
  • 30
  • 1
    Sounds like you are looking for an ncurses implementation, see the answer you already got. Depending on your exact needs, there's also a lot of potentially interesting answers in this post: http://stackoverflow.com/questions/1805499/is-there-a-command-line-framework-for-ruby – Michael Kohl Dec 11 '11 at 13:02

2 Answers2

1

If you are on Ruby 1.9.x, you can take a look at rbcurse, a

ruby based curses widgets: fields, buttons, textarea. menus, message boxes, tabbed panes, tables, listboxes, splitpanes, scrollpanes. Event based, MVC architecture.

The developer recently split the functionality up into

miku
  • 181,842
  • 47
  • 306
  • 310
  • Is there a difference between text/entry fields Textarea in this library – pankajdoharey Dec 11 '11 at 12:55
  • Yes, you can have non-editable text such as labels, or editable text in a TextArea. TextView is non-editable, scrollable text box which contains vim-like bindings for navigation. There is also Field which is for entering one-line text such as name, address etc. – rahul Jan 01 '12 at 13:45
0

I wrote tty-box for creating flexible terminal boxes.

You can do more complex layouts of many boxes that are interlinked as well.

Piotr Murach
  • 547
  • 6
  • 10
  • No worries. This is for the benefit of the Ruby devs that may still be looking for answers, especially without dependency on ncurses. – Piotr Murach Oct 11 '19 at 11:55