diff options
| author | Zack Hobson | 2013-11-22 10:54:03 -0800 |
|---|---|---|
| committer | Zack Hobson | 2013-11-22 10:54:03 -0800 |
| commit | 6f8f7812e896c58cec91fc682528969b58807d41 (patch) | |
| tree | 7aeb6e2869e8cdd22cc6bb18810b7a1a53cfbfc6 /lib | |
| parent | acd4a95dd66990e6afa750367532acdd4267ad81 (diff) | |
| download | hcl-6f8f7812e896c58cec91fc682528969b58807d41.tar.bz2 | |
note command: show notes with no args.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/hcl/commands.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/hcl/commands.rb b/lib/hcl/commands.rb index d1861de..9c7e913 100644 --- a/lib/hcl/commands.rb +++ b/lib/hcl/commands.rb @@ -108,11 +108,14 @@ module HCl end def note *args - message = args.join ' ' entry = DayEntry.with_timer if entry - entry.append_note message - "Added note to #{entry}." + if args.empty? + return entry.notes + else + entry.append_note args.join(' ') + "Added note to #{entry}." + end else puts "No running timers found." exit 1 |
