melbahja / ron

Ron: A simple bash task runner to run any executable file inside a .ron directory or `ron.yaml` file!

Home Page:https://git.io/.ron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ron

The simple command line task runner.

InstallationUsageBash AutocompleteLicense

Installation

Start by download latest version for your OS:

# Linux
curl -fSL https://github.com/melbahja/ron/releases/latest/download/ron_linux -o ron


# MacOS
curl -fSL https://github.com/melbahja/ron/releases/latest/download/ron_macos -o ron


# Windows
curl -fSL https://github.com/melbahja/ron/releases/latest/download/ron_windows.exe -o ron.exe

Then make the binary executable and move it to bin path:

chmod +x ron
sudo mv ron /usr/bin/ron

for Gophers you can go get github.com/melbahja/ron.

Usage

Ron is a very simple task runner that execute any executable file inside a .ron directory for example if you have this tree in your project:

.ron/
├── foo/
│   ├── .default
│   ├── bar
│   └── baz
├── .default
└── serve

.default file is the default executable for directories.

To execute .ron/.default run:

ron

To execute .ron/serve file run:

ron serve

To execute .ron/foo/.default run:

ron foo

To execute .ron/foo/bar run:

ron foo bar

Note: also you can use binary files inside .ron directory.

See Ron's .ron directory.

Bash Autocomplete

Add this to your bash profile (.bashrc):

_ron_bash_autocomplete() {
  if [[ "${COMP_WORDS[0]}" != "source" ]]; then
    local cur opts base
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    if [[ "$cur" == "-"* ]]; then
      opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} ${cur} --generate-bash-completion )
    else
      opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
    fi
    COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
    return 0
  fi
}

complete -F _ron_bash_autocomplete ron

License

Ron is provided under the MIT License.

About

Ron: A simple bash task runner to run any executable file inside a .ron directory or `ron.yaml` file!

https://git.io/.ron

License:MIT License


Languages

Language:Go 89.7%Language:Shell 10.3%