Project

micromenu

0.0
Repository is archived
No release in over a year
A cute little menu system written in Ruby. Run this in any directory to show a file listing with just sub-directories and executable files. Navigation can be quickened by providing your selection as command line arguments.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.23.1
 Project Readme

μMenu

Gem Version

A cute little menu system written in Ruby 🥰

Installation

From GitHub:

git clone git@github.com:tristanpenman/micromenu.git
cd micromenu
gem build micromenu.gemspec
gem install ./micromenu-*.gem

From RubyGems:

gem install micromenu

Usage

Once it's in your path, you can run μMenu from anywhere using um.

$ cd examples
$ um
✨ μMenu ✨
Select an action: (Use ↑/↓ arrow keys or numbers to select)
‣ 1) 📁 group-a
  2) 📁 group-b

The directory group-b contains a sub-directory subgroup-a, so you can navigate down to that.

When an executable file is discovered, you will be prompted to provide arguments for it.

Starting directory

Running um with a particular path as its first argument will change the working directory before doing anything else. e.g:

um examples

The output from running um examples should look like this:

$ um examples
✨ μMenu ✨
Select an action: (Use ↑/↓ arrow keys or numbers to select)
‣ 1) 📁 group-a
  2) 📁 group-b

This is designed so that you can create bash aliases and the like. For example, I have a collection of scripts that I use in my work at Vivi, so I have created an alias called umv.

I also have another called um64 for N64 development.

Arguments

If you pass in a complete selection of navigation arguments, then any remaining arguments will be passed to the child process. For example:

$ um examples 1 1 hello world
✨ μMenu ✨
⤷ group-a
⤷ simon-says
hello world

Acknowledgements

μMenu makes good use of tty-prompt, which really keeps things simple. Shout out to Piotr Murach for creating it!

License

This code is licensed under the MIT License.

See the LICENSE file for more information.