2
3
鏡像自 https://github.com/sammy-ette/Hilbish synced 2025-08-10 02:52:03 +00:00

feat: add hilbish.cwd function

This commit is contained in:
sammyette 2021-05-27 19:06:17 -04:00
父節點 ba6d7972e0
當前提交 af4b4b2ae0
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 50EE40A2809851F5

查看文件

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