lib/tsks/cli.rb in tsks-0.0.6 vs lib/tsks/cli.rb in tsks-0.0.7
- old
+ new
@@ -63,16 +63,16 @@
end
tsks = nil
if options[:done] && options[:context]
- tsks = Tsks::Storage.select_by({done: 1, context: options[:context]})
+ tsks = Tsks::Storage.select_by({status: 'done', context: options[:context]})
elsif options[:done]
- tsks = Tsks::Storage.select_by({done: 1})
+ tsks = Tsks::Storage.select_by({status: 'done'})
elsif options[:context]
tsks = Tsks::Storage.select_by({context: options[:context]})
else
- tsks = Tsks::Storage.select_by({done: 0})
+ tsks = Tsks::Storage.select_by({status: 'todo'})
end
if tsks.count > 0
for tsk in tsks
puts "#{tsk[:local_id]} @#{tsk[:context]} #{tsk[:tsk]}"