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

pull/59/head
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
1 changed files with 7 additions and 5 deletions

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