Home

Awesome

Runner

Run everything like a script!

Note that this might not be so stable as V is still in a very early stage. Maybe check the older version Executor

Supported files

Installation

$ git clone https://github.com/Naheel-Azawy/runner.git
$ cd runner
$ make && sudo make install

Usage

$ rn hello.c

Or even better, add a shebang to your file test.vala:

#!/bin/rn
void main() { print ("Hello!\n"); }
$ chmod +x test.vala
$ ./test.vala

It's also possible to run a range of lines

$ ./test.ts --from 3 --to 5

One more cool feature! I leave you with examples:

$ rn -r Hello vala 'print (@"$(args[1]) from VALA\n")'
Hello from VALA
$ rn -r Hello c++ 'cout << argv[1] << " from CPP" << endl'
Hello from CPP
$ rn -r "1 1" c 'int i=atoi(argv[1]),j=atoi(argv[2]),k=i+j;printf("%d + %d = %d\n",i,j,k)'
1 + 1 = 2

Emacs

Add this to you .emacs:

(defun run-program ()
  (interactive)
  (defvar cmd)
  (setq cmd (concat "rn " (buffer-name) ))
  (shell-command cmd))
(global-set-key [C-f5] 'run-program)

screenshot

Gedit

Yes! it comes with a gedit plugin!

screenshot

Add / Override

Create ~/.config/.runners.json. Example:

{
    ".js": {
        "ext": "js",
        "outFile": "'{sourceFile}'",
        "cm": "",
        "rn": "gjs {outFile}"
    }
}

Clean up

Binaries will be generated under '~/.cache/runnables directory.

License

GPL