Home

Awesome

Executor

Run everything like a script!

Supported files

Installation

$ curl https://raw.githubusercontent.com/Naheel-Azawy/Executor/master/install-online | bash

or

$ git clone https://github.com/Naheel-Azawy/Executor.git
$ cd Executor
$ sudo ./install

Docker

The docker image is based on archlinux/base. The image should be around 5.76GB, so the build takes time...

docker build -t executor .
docker run -it executor

Usage

$ execute hello.c

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

#!/bin/execute
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:

$ execute -r Hello vala 'print (@"$(args[1]) from VALA\n")'
Hello from VALA
$ execute -r Hello c++ 'cout << argv[1] << " from CPP" << endl'
Hello from CPP
$ execute -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 execute-program ()
  (interactive)
  (defvar cmd)
  (setq cmd (concat "execute " (buffer-name) ))
  (shell-command cmd))
(global-set-key [C-f5] 'execute-program)

screenshot

Gedit

Yes! it comes with a gedit plugin!

screenshot

Add / Override

Create .executor.json in home directory. Example:

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

Clean up

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

License

GPL