bin/commands/now.rb in doing-2.1.38 vs bin/commands/now.rb in doing-2.1.39
- old
+ new
@@ -81,11 +81,10 @@
note.add(ask_note) if ask_note.good?
end
date = d.nil? ? date : d
@wwid.add_item(title.cap_first, section, { note: note, back: date, timed: options[:finish_last] })
- @wwid.write(@wwid.doing_file)
elsif args.length.positive?
d, title, note = @wwid.format_input(args.join(' '))
date = d.nil? ? date : d
note.add(options[:note]) if options[:note]
note.add(ask_note) if ask_note.good?
@@ -95,11 +94,10 @@
entry.tag('done', value: options[:done])
else
entry.tag('done')
end
end
- @wwid.write(@wwid.doing_file)
elsif global_options[:stdin]
input = global_options[:stdin]
d, title, note = @wwid.format_input(input)
unless d.nil?
Doing.logger.debug('Parser:', 'Date detected in input, overriding command line values')
@@ -116,11 +114,10 @@
entry.tag('done', value: options[:done])
else
entry.tag('done')
end
end
- @wwid.write(@wwid.doing_file)
else
tags = @wwid.all_tags(@wwid.content)
$stderr.puts Doing::Color.boldgreen("Add a new entry. Tab will autocomplete known tags. Ctrl-c to cancel.")
title = Doing::Prompt.read_line(prompt: 'Entry content', completions: tags)
raise EmptyInput, 'You must provide content when creating a new entry' unless title.good?
@@ -137,9 +134,10 @@
entry.tag('done', value: options[:done])
else
entry.tag('done')
end
end
- @wwid.write(@wwid.doing_file)
end
+
+ @wwid.write(@wwid.doing_file)
end
end