Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

readme fixes

  • Loading branch information...
commit 20ecc4c68fb47f51cbf10d98b6d774802dc6b074 1 parent fad6338
@mtrudel authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 README → README.md
View
12 README → README.md
@@ -1,3 +1,5 @@
+# Menutree
+
Menutree is a framework for presenting a recursive menu 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,
@@ -7,11 +9,12 @@ 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:
+## Example:
Given a hypothetical program 'ticker' that uses the Menutree gem to manage a list of
tickets, a sample interaction might look like:
+<pre>
$ ticker
> init
Ticker created an empty ticket database
@@ -22,22 +25,25 @@ rm> 213
Ticket 213 ("Do a little dance") removed
rm> ..
> exit
+</pre>
Commands could also be run from the shell:
+<pre>
$ ticker add "Make a little love"
Ticket "Make a little love" added as ticket 214
+</pre>
To implement this, ticker would provide Menutree with a directory that looked
like:
+<pre>
commands/
init.rb
add/
default.rb
rm/
default.rb
-
-
+</pre>
Please sign in to comment.
Something went wrong with that request. Please try again.