From 1c2d186843bbd5200960b0c733483fb66919e4a8 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Wed, 1 May 2019 09:11:06 -0500 Subject: [PATCH] Clean up usage messages. --- app_state.go | 24 +++++++++++++++++------- timer_ops.go | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app_state.go b/app_state.go index 1d85a93..253936d 100644 --- a/app_state.go +++ b/app_state.go @@ -145,8 +145,9 @@ func (a *AppState) initialize() { ) a.addOperation("switch", []string{ - "switch [time] [@contexts...] [+projects...] [tag:value...] - Stops all active timers and starts a new one", - " with the given arguments", + "switch [time] [@contexts...] [+projects...] [tag:value...]", + " - Stops all active timers and starts a new one", + " with the given arguments", }, a.opSwitchTimer, ) @@ -172,7 +173,8 @@ func (a *AppState) initialize() { a.addOperation("mod", []string{ "mod [start=] [end=] [projects=] [contexts=]", - " - Prints the status of all active timers", + " - Modify timer with id changes are absolute, so, e.g., if you pass a", + " 'projects' tag, the projects on the timer will be replaced with the value", }, a.opModifyTimer, ) @@ -183,22 +185,30 @@ func (a *AppState) initialize() { a.opFuzzyParse, ) a.addOperation("--reinit", - []string{"--reinit - Reset all Configuration Settings"}, + []string{ + "--reinit - Reset all Configuration Settings", + }, func(args []string) int { a.initializeConfig() return 0 }, ) a.addOperation("-h", - []string{"-h - Print this message"}, + []string{ + "-h - Print this message", + }, a.opPrintUsage, ) a.addOperation("help", - []string{"help - Print this message"}, + []string{ + "help - Print this message", + }, a.opPrintUsage, ) a.addOperation("--h", - []string{"--h - Print this message"}, + []string{ + "--h - Print this message", + }, a.opPrintUsage, ) a.directory = a.config.Get("directory") diff --git a/timer_ops.go b/timer_ops.go index 1d76ccd..3c8a497 100644 --- a/timer_ops.go +++ b/timer_ops.go @@ -420,8 +420,8 @@ func (a *AppState) opPrintUsage(args []string) int { for _, v := range a.ValidOperations { for _, vv := range v { fmt.Println(" " + vv) - fmt.Println("") } + fmt.Println("") } return 0 }