wow
This commit is contained in:
38
SPEC.md
Normal file
38
SPEC.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Luash
|
||||
|
||||
A lua preprocessor for shell scripting.
|
||||
|
||||
## Why
|
||||
|
||||
Although traditional POSIX shells are highly portable and can be extremely fast, their syntax can be arduous to read.
|
||||
|
||||
Lua is a lightweight and fast language that already has the features needed to become a great scripting language.
|
||||
|
||||
This project aims to add syntactic sugar to make the process of write commands in lua much easier.
|
||||
|
||||
Inspired by other projects such as Xonsh and Ruby.
|
||||
|
||||
## Features
|
||||
|
||||
Shell execution via backticks
|
||||
|
||||
```lua
|
||||
files = `ls -a`
|
||||
```
|
||||
|
||||
Variable substitution in shell commands
|
||||
|
||||
```lua
|
||||
dir = "/"
|
||||
files = `ls #{dir}`
|
||||
```
|
||||
|
||||
Environment variable access
|
||||
|
||||
```lua
|
||||
print($SHELL)
|
||||
terminal = $TERM
|
||||
|
||||
print("This will just print normally $SHELL")
|
||||
print("This will substitute with the environment variable ${SHELL}")
|
||||
```
|
||||
Reference in New Issue
Block a user