Skip to content

oc-ulos/luash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LuaSH

A two-part shell (half library, half REPL) for ULOS 2. Its design is heavily inspired by https://github.com/zserge/luash.

Library

local sh = require("sh")

LuaSH can compile basic Bourne-stype statements:

sh.compile("ls /bin | grep .*s.*") = sh.ls("/bin"):grep(".*s.*")

This is not perfect, and it is recommended to simply use LuaSH's features directly. For example, ls /bin | grep $(ls /lib) $filter = sh.ls("/bin"):grep(sh.split(sh.ls("/lib")), sh.getenv("filter")) - so even if there are multiple files in /lib, only the first will be passed due to how Lua's varargs work.

Releases

No releases published

Packages

No packages published

Languages