feat: add more require paths and change ordering

pull/38/head
sammy 2021-04-09 23:13:28 -04:00
parent 1868715b8a
commit 3cb8e64dc0
1 changed files with 5 additions and 2 deletions

7
lua.go
View File

@ -50,8 +50,11 @@ func LuaInit(confpath string) {
// Add more paths that Lua can require from
l.DoString(`package.path = package.path
.. ';./libs/?/init.lua;/usr/share/hilbish/libs/?/init.lua'
.. ';./?/init.lua;./?/?.lua'
.. ';./libs/?/init.lua;./?/init.lua;./?/?.lua'
.. ';/usr/share/hilbish/libs/?/init.lua;'
.. os.getenv 'HOME' .. '/.local/share/hilbish/libs/?/init.lua;'
.. os.getenv 'HOME' .. '/.local/share/hilbish/libs/?/?.lua'
print(package.path)
`)
err := l.DoFile("/usr/share/hilbish/preload.lua")