style: add spaces between binary ops and rename appendpath function to be camelCase

pull/42/head
sammy 2021-04-28 18:35:04 -04:00
parent 345ff65da8
commit d551d0f2ab
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 3 additions and 3 deletions

6
lua.go
View File

@ -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
} }