Compare commits

...

2 Commits

Author SHA1 Message Date
sammy 08c56a54ca
style: formatting 2021-04-20 17:52:01 -04:00
sammy 428db24831
style: put all vars in 1 var() 2021-04-20 17:51:12 -04:00
1 changed files with 18 additions and 17 deletions

25
main.go
View File

@ -2,35 +2,36 @@ package main
import (
"fmt"
hooks "hilbish/golibs/bait"
"io"
"os"
"os/signal"
"os/user"
"strings"
hooks "hilbish/golibs/bait"
"github.com/akamensky/argparse"
"github.com/bobappleyard/readline"
lua "github.com/yuin/gopher-lua"
"github.com/yuin/gopher-lua"
"golang.org/x/term"
)
const version = "0.3.2"
var l *lua.LState
var (
l *lua.LState
// User's prompt, this will get set when lua side is initialized
var prompt string
var multilinePrompt = "> "
prompt string
multilinePrompt = "> "
// Map of builtin/custom commands defined in the commander lua module
var commands = map[string]bool{}
commands = map[string]bool{}
aliases = map[string]string{}
// Command aliases
var aliases = map[string]string{}
var bait hooks.Bait
var homedir string
var running bool
bait hooks.Bait
homedir string
running bool
)
func main() {
homedir, _ = os.UserHomeDir()