From f82c6ff724d6e56052c40f409be785b796eca2ab Mon Sep 17 00:00:00 2001 From: Nikolaus Gotsche Date: Sat, 15 Sep 2018 18:17:31 +0200 Subject: Load new DB with flag fully implemented --- interact.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'interact.go') diff --git a/interact.go b/interact.go index 6ed06c6..7514046 100644 --- a/interact.go +++ b/interact.go @@ -31,7 +31,7 @@ func interact() { promptcol := boldBlue // display info. - shell.Println("Starting interactive Shell") + //shell.Println("Starting interactive Shell") shell.SetPrompt(promptcol(">>>")) shell.AddCmd(&ishell.Cmd{ @@ -569,12 +569,14 @@ func interact() { // teardown //shell.Close() // when started with "exit" as first argument, assume non-interact ive execution + args := removeStringFromArray(os.Args[1:],"-file",1) - if len(os.Args) > 1 { - args := removeStringFromArray(os.Args[1:],"-file",1) + if len(args) > 0 { + //args := removeStringFromArray(os.Args[1:],"-file",1) //fmt.Println(args) shell.Process(args...) } else { + shell.Println("Starting interactive Shell") //start shell shell.Run() // teardown -- cgit v1.2.3