mirror of https://github.com/Hilbis/Hilbish
feat: define preload file in var
same as before, enables changing at compile timepull/60/head
parent
be5ebd6ada
commit
e37abcb08b
2
lua.go
2
lua.go
|
@ -62,7 +62,7 @@ func LuaInit() {
|
|||
|
||||
err := l.DoFile("preload.lua")
|
||||
if err != nil {
|
||||
err = l.DoFile("/usr/share/hilbish/preload.lua")
|
||||
err = l.DoFile(preloadPath)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr,
|
||||
"Missing preload file, builtins may be missing.")
|
||||
|
|
2
vars.go
2
vars.go
|
@ -9,6 +9,7 @@ var (
|
|||
.. os.getenv 'HOME' .. '/.local/share/hilbish/libs/?/init.lua;'
|
||||
.. os.getenv 'HOME' .. '/.local/share/hilbish/libs/?/?.lua;'
|
||||
.. os.getenv 'HOME' .. '/.local/share/hilbish/libs/?.lua'`
|
||||
preloadPath = "/usr/share/hilbish/preload.lua"
|
||||
|
||||
prompt string // Prompt will always get changed anyway
|
||||
multilinePrompt = "> "
|
||||
|
@ -20,6 +21,5 @@ var (
|
|||
interactive bool
|
||||
login bool // Are we the login shell?
|
||||
noexecute bool // Should we run Lua or only report syntax errors
|
||||
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue