Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/toumorokoshi/garage

A place to put and get your shell scripts
https://github.com/toumorokoshi/garage

Last synced: 8 days ago
JSON representation

A place to put and get your shell scripts

Awesome Lists containing this project

README

        

# Garage

Garage is a shell command management tool. It includes:

* package management of shell commands
* multi-level namespacing of commands
* smart completion helper to find the commands that do what you want

## Smart completion

If you type:

garage :find

This will bring up an ncurses-like interface with a blank text prompt. Garage looks through all existing commands,
and looks for strings (on a single line) that match the format:

gfind: ;

The text typed by the user will match against , and if
executed will execute the commands as dictated in .

You can choose not to add a '; '. This results in
the command not being runnable, but will still appear in the
completion.

For example, let's say we want to create a gfind entry for grep. A couple examples would be:

# no command_arguments, will complete but will not be executable
# gfind: search for specific lines of text for files in a folder

# with command_arguments, will complete and be executable
# gfind: search for the text "foo" recursively in the current directory; grep -r 'foo' *

# installing garage

to install garage, there must be a shell function wrapper around
it. (applications can not explicitely execute commands)

There is some magic that happens here, but effectively you must add this to your .rc (.bashrc/.zrc/etc):

function garage() {
`PATH_TO_GARAGE/garage 3>&1 1>&2`
}