feat: add hilbish.cwd function

pull/59/head
sammyette 2021-05-27 19:06:17 -04:00
parent ba6d7972e0
commit af4b4b2ae0
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 10 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
var exports = map[string]lua.LGFunction {
"run": run,
"flag": flag,
"cwd": cwd,
}
func HilbishLoader(L *lua.LState) int {
@ -53,3 +54,12 @@ func flag(L *lua.LState) int {
return 1
}
func cwd(L *lua.LState) int {
cwd, _ := os.Getwd()
L.Push(lua.LString(cwd))
return 1
}