summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interact.go8
-rw-r--r--main.go11
2 files changed, 13 insertions, 6 deletions
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
diff --git a/main.go b/main.go
index bcfe22b..c34a829 100644
--- a/main.go
+++ b/main.go
@@ -62,7 +62,7 @@ func init() {
"Test Some Functions")
flag.StringVar(&filename,
"file",
- "~/.mytimes.db",
+ "none",
"Open a different Database than specified in Configuration")
// CUSTOMIZE USAGE
flag.Usage = func() {
@@ -94,6 +94,10 @@ func main() {
// }
initConf()
dbname = config.Database
+
+ if filename != "none" {
+ dbname = filename
+ }
/* if len(flag.Args())>0 {
aar := flag.Args()
@@ -118,8 +122,9 @@ func main() {
*/
if test {
- fmt.Println(getGitTag())
- fmt.Println("Nothing to test")
+ fmt.Println(Round(12.55,0.5),Round(12.55,0.1),Round(12.55,1),Round(12.55,5))
+ //fmt.Println(getGitTag())
+ //fmt.Println("Nothing to test")
//tmpltest()
//newBill(1)
//c := []int{2,3}