mirror of https://github.com/Hilbis/Hilbish
style: add spaces between binary ops and rename appendpath function to be camelCase
parent
345ff65da8
commit
d551d0f2ab
6
lua.go
6
lua.go
|
@ -27,7 +27,7 @@ func LuaInit(confpath string) {
|
||||||
l.SetGlobal("prompt", l.NewFunction(hshprompt))
|
l.SetGlobal("prompt", l.NewFunction(hshprompt))
|
||||||
l.SetGlobal("multiprompt", l.NewFunction(hshmlprompt))
|
l.SetGlobal("multiprompt", l.NewFunction(hshmlprompt))
|
||||||
l.SetGlobal("alias", l.NewFunction(hshalias))
|
l.SetGlobal("alias", l.NewFunction(hshalias))
|
||||||
l.SetGlobal("appendpath", l.NewFunction(hsappendpath))
|
l.SetGlobal("appendPath", l.NewFunction(hshappendPath))
|
||||||
|
|
||||||
// Add fs module to Lua
|
// Add fs module to Lua
|
||||||
l.PreloadModule("fs", lfs.Loader)
|
l.PreloadModule("fs", lfs.Loader)
|
||||||
|
@ -101,10 +101,10 @@ func hshalias(L *lua.LState) int {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
func hsappendpath(L *lua.LState) int {
|
func hshappendPath(L *lua.LState) int {
|
||||||
path := L.ToString(1)
|
path := L.ToString(1)
|
||||||
|
|
||||||
os.Setenv("PATH", os.Getenv("PATH")+":"+path)
|
os.Setenv("PATH", os.Getenv("PATH") + ":" + path)
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue