mirror of https://github.com/Hilbis/Hilbish
feat: add hilbish.cwd function
parent
ba6d7972e0
commit
af4b4b2ae0
10
hilbish.go
10
hilbish.go
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue