2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-02 19:53:23 +00:00

fix: reorder init code, making hilbish faster when used non-interactively

This commit is contained in:
sammy 2021-05-08 09:30:14 -04:00
parent 941902f43b
commit 8d5e36bcde
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5

12
main.go
View File

@ -108,15 +108,12 @@ func main() {
}
}
go HandleSignals()
LuaInit()
RunLogin()
RunInput(*cmdflag)
RunConfig(*configflag)
readline.Completer = readline.FilenameCompleter
readline.LoadHistory(homedir + "/.hilbish-history")
RunInput(*cmdflag)
if getopt.NArgs() > 0 {
err := l.DoFile(getopt.Arg(0))
if err != nil {
@ -126,6 +123,11 @@ func main() {
os.Exit(0)
}
readline.Completer = readline.FilenameCompleter
readline.LoadHistory(homedir + "/.hilbish-history")
go HandleSignals()
for interactive {
running = false