diff options
| -rw-r--r-- | README.markdown | 10 | ||||
| -rw-r--r-- | lib/hcl/commands.rb | 5 | 
2 files changed, 15 insertions, 0 deletions
| diff --git a/README.markdown b/README.markdown index b25d2c9..67fbaf1 100644 --- a/README.markdown +++ b/README.markdown @@ -23,6 +23,7 @@ or you can install from source using jeweler:      hcl note <message>      hcl stop [message]      hcl resume [@<task_alias>] +    hcl log (@<task_alias> | <project_id> <task_id>) [+<time>] [<message>]      hcl show [date]      hcl tasks      hcl alias <task_alias> <project_id> <task_id> @@ -86,6 +87,15 @@ it:  This will delete the running timer, or the last-updated timer if one isn't  running. You can also use `nvm` or `oops` instead of `cancel`. +### Logging without Starting a Timer + +You can log time and notes without leaving a timer running. It takes +the same arguments as start: + +    $ hcl log @xdev +1 Worked for an hour. + +The above starts and immediately stops a one-hour timer with the given note. +  ### Date Formats  Dates can be expressed in a variety of ways. See the [Chronic documentation][cd] diff --git a/lib/hcl/commands.rb b/lib/hcl/commands.rb index eb83dcd..250ec0e 100644 --- a/lib/hcl/commands.rb +++ b/lib/hcl/commands.rb @@ -79,6 +79,11 @@ module HCl        puts "Started timer for #{timer} (at #{current_time})"      end +    def log *args +      start *args +      stop +    end +      def stop *args        entry = DayEntry.with_timer || DayEntry.with_timer(DateTime.yesterday)        if entry | 
