Ruby API to create terminal-based menus, using curses.
- Easy navigation using arrows, page up/down, home, end, enter and escape keys.
- Several actions per menu item.
- Scrolling support.
- Extensive formatting options with colors, alignments, decorations...
- Easy support for sub-menus.
- Automatic key presses for autmating tasks in the menu.
- Ruby-like API.
Via gem
$ gem install curses_menu
Via a Gemfile
$ gem 'curses_menu'
require 'curses_menu'
CursesMenu.new 'My awesome new menu!' do |menu|
menu.item 'How\'s life?' do
puts 'Couldn\'t be easier'
:menu_exit
end
end
Check the examples folder for more examples.
Please see CHANGELOG for more information on what has changed recently.
Automated tests are done using rspec.
Do execute them, first install development dependencies:
bundle install
Then execute rspec
bundle exec rspec
Any contribution is welcome:
- Fork the github project and create pull requests.
- Report bugs by creating tickets.
- Suggest improvements and new features by creating tickets.
- [Muriel Salvan][link-author]
The BSD License. Please see License File for more information.