Socket
Book a DemoInstallSign in
Socket

menutree

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

menutree

0.1.1
bundlerRubygems
Version published
Maintainers
2
Created
Source

Menutree

Menutree is a framework for presenting a recursive Read-Eval-Print Loop (REPL) shell on the command line, inspired by the CLI found in Cisco IOS and other similar products. Menutree lets users issue commands via an interactive nested shell interface, and also directly from the command line.

The menu structure and commands therein are defined by a directory of ruby scripts conforming to a simple interface. Inline help, command completion, and readline support are all built in.

Example:

Given a hypothetical program 'ticket' that uses the Menutree gem to manage a list of tickets (such a program is included in examples/), a sample interaction might look like:

$ ruby ticket.rb
> action_one 
One
> submenu_one
/submenu_one> action_one
Unknown command 'action_one'
/submenu_one> ..
> exit

Commands could also be run from the shell:

$ rubyticke add "Make a little love"
Ticket "Make a little love" added as ticket 214

To implement this, ticker would provide Menutree with a directory that looked like:

commands/
	init.rb
	add/
		default.rb
	rm/
		default.rb

FAQs

Package last updated on 05 Jan 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.