Skip to content

A tiny lua library that allows you to require binary executables as functions, written in pure lua.

Notifications You must be signed in to change notification settings

UtoECat/lua_requirebin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

lua_requirebin

A tiny lua library that allows you to include binary executables as functions, written in pure lua.

usage

require "requirebin"
pstree = require "pstree"
print(pstree())

The result function returns a string containing the output of the called application to standard output, and status.
You can even pass arguments to process :

ls = require "ls"
print(ls('-l', '-d'))

NEW FEATURE :
assigning the result of require to a global variable is now optional! If the variable by the name of the executable file is empty, a function will also be written to it.

use cases

  1. To replace shell scripts with lua scripts (lua can be compiled)

todo

  1. Check is it works on windows.
    2. Adding a function to global variables if it is empty.

About

A tiny lua library that allows you to require binary executables as functions, written in pure lua.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages