diff --git a/README.md b/README.md index 34deb94..9507d88 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ hakuna timer start --taskId=2 --note="Building cool stuff!" ``` If you don't want to use environment variables you can use the `.hakuna.yaml` config file. -The CLI searches for the config file in two places, the first in the current directory and +The CLI searches for the config file in two places, first in the current directory and after that in the user home directory. Example using the config file: diff --git a/cmd/tasks.go b/cmd/tasks.go index eb4de41..9ce942e 100644 --- a/cmd/tasks.go +++ b/cmd/tasks.go @@ -24,7 +24,7 @@ import ( // tasksCmd represents the tasks command var tasksCmd = &cobra.Command{ Use: "tasks", - Short: "List all task", + Short: "List all tasks", RunE: func(cmd *cobra.Command, args []string) error { format, err := cmd.LocalFlags().GetString("format") if err != nil { diff --git a/cmd/timer.go b/cmd/timer.go index a24245b..9b632fe 100644 --- a/cmd/timer.go +++ b/cmd/timer.go @@ -97,9 +97,14 @@ func startTimer(cmd *cobra.Command, args []string) error { startTime = pTime } + noteFlag, err := cmd.LocalFlags().GetString("note") + if err != nil { + return err + } + h := initHakunaClient() - req, err := hakuna.NewStartTimerReq(taskId, startTime, "", 0) + req, err := hakuna.NewStartTimerReq(taskId, startTime, noteFlag, 0) if err != nil { return err }