doing 2.1.15 → 2.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +5 -5
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +24 -0
  6. data/Gemfile.lock +1 -1
  7. data/README.md +1 -1
  8. data/bin/doing +109 -44
  9. data/docs/doc/Array.html +1 -1
  10. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  11. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  12. data/docs/doc/BooleanTermParser/Query.html +1 -1
  13. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  14. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  15. data/docs/doc/BooleanTermParser.html +1 -1
  16. data/docs/doc/Doing/Color.html +1 -1
  17. data/docs/doc/Doing/Completion.html +1 -1
  18. data/docs/doc/Doing/Configuration.html +1 -1
  19. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  20. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  21. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  22. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  23. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  24. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  25. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  26. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  27. data/docs/doc/Doing/Errors.html +1 -1
  28. data/docs/doc/Doing/Hooks.html +1 -1
  29. data/docs/doc/Doing/Item.html +1 -1
  30. data/docs/doc/Doing/Items.html +1 -1
  31. data/docs/doc/Doing/LogAdapter.html +1 -1
  32. data/docs/doc/Doing/Note.html +1 -1
  33. data/docs/doc/Doing/Pager.html +1 -1
  34. data/docs/doc/Doing/Plugins.html +1 -1
  35. data/docs/doc/Doing/Prompt.html +69 -1
  36. data/docs/doc/Doing/Section.html +1 -1
  37. data/docs/doc/Doing/TemplateString.html +2 -2
  38. data/docs/doc/Doing/Util/Backup.html +1 -1
  39. data/docs/doc/Doing/Util.html +1 -1
  40. data/docs/doc/Doing/WWID.html +37 -3
  41. data/docs/doc/Doing.html +2 -2
  42. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  43. data/docs/doc/GLI/Commands.html +1 -1
  44. data/docs/doc/GLI.html +1 -1
  45. data/docs/doc/Hash.html +1 -1
  46. data/docs/doc/Numeric.html +1 -1
  47. data/docs/doc/PhraseParser/Operator.html +1 -1
  48. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  49. data/docs/doc/PhraseParser/Query.html +1 -1
  50. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  51. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  52. data/docs/doc/PhraseParser/TermClause.html +1 -1
  53. data/docs/doc/PhraseParser.html +1 -1
  54. data/docs/doc/Status.html +1 -1
  55. data/docs/doc/String.html +92 -1
  56. data/docs/doc/Symbol.html +1 -1
  57. data/docs/doc/Time.html +1 -1
  58. data/docs/doc/_index.html +1 -1
  59. data/docs/doc/file.README.html +2 -2
  60. data/docs/doc/index.html +2 -2
  61. data/docs/doc/method_list.html +209 -185
  62. data/docs/doc/top-level-namespace.html +1 -1
  63. data/doing.rdoc +14 -4
  64. data/lib/completion/_doing.zsh +2 -2
  65. data/lib/completion/doing.bash +2 -2
  66. data/lib/completion/doing.fish +2 -1
  67. data/lib/doing/prompt.rb +41 -0
  68. data/lib/doing/string_chronify.rb +28 -0
  69. data/lib/doing/template_string.rb +1 -1
  70. data/lib/doing/version.rb +1 -1
  71. data/lib/doing/wwid.rb +43 -13
  72. data/lib/doing.rb +5 -4
  73. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef87837797a4c4f78b5001d5406a39665fe0e5916b3661432b72d26bc010d76b
4
- data.tar.gz: 5413337d6be271cacb20ce9a97032939756b5bf3a26bffc32070473594f26a9b
3
+ metadata.gz: 401f509f952c1f59117bd72b97a7539ee2aa011a876b24ddeacc6b535f7d0021
4
+ data.tar.gz: afa5d5ca709bf06ef3c686ca5f6af48b75c6dbd09445c36a4de6c78f793ee879
5
5
  SHA512:
6
- metadata.gz: 7b91a1564f48b61b030d78f6fc5e6d7f499b9ddff771a56cc09fa14f1fd5ec5bb98d03604c686b5f4a4975a969aa9741540002dd6bef9c556db9ffd59da4cd98
7
- data.tar.gz: 9d3be852d62d07b9cf30cdd5880dd7854056d657a8c65c80f6a1480fff28083ef6e00a6af26c4d11cecfbfdc89b613803089f1aba3815debd6270909ac7a675d
6
+ metadata.gz: 6b2fa35dd2651785705b36a8ae12aca8e806476c2309b3e580ae06b87f75b0a0ac317389ac0fd21c28bca52a9c623b9c3892556c483230cf8603fd2eb7fdaf5a
7
+ data.tar.gz: 100407094cbcda4a0f24350ab84d5b923f367cee8913942e107f5bea177e6133be09819d1d1f408d8dd3ace35eff22446108d6bb377fb6f6149f2057566fbd8a
data/.yardoc/checksums CHANGED
@@ -3,18 +3,18 @@ lib/doing/item.rb 017fe4de05ccfd8bab912e744f9dac9e52819b00
3
3
  lib/doing/note.rb bbadd9e34e6dc43a2af1110a5107f46c39d2547f
4
4
  lib/doing/time.rb 60183c3c31532ffea1440c766de0f90042e0fd10
5
5
  lib/doing/util.rb 33ad79455893213a0f2993edec0e158526657f09
6
- lib/doing/wwid.rb f2b3dda412fe2018e51593b89cab3f57dbcc9f41
6
+ lib/doing/wwid.rb ee8ab91af8d34f1fe9c9ec6e6c96e5e4e648a9b0
7
7
  lib/doing/array.rb a17004c4811d239932254f9ed94a6eb10456c8e8
8
8
  lib/doing/hooks.rb acf6e0615ccf1949f84915c979297845242c1205
9
9
  lib/doing/items.rb 8cda7caaef10645893267262f5eee681e35046ce
10
10
  lib/doing/pager.rb b58e478b0cb8d400ddb97988ba741e3a127b53c3
11
11
  lib/doing/colors.rb 9a628d48c821313c502deedc5b61a046a2bf79ef
12
12
  lib/doing/errors.rb af07e482a5389924edc2337749c81cda501098f0
13
- lib/doing/prompt.rb 075dc22031e0f1cd5b2a8dd4cb6e6c3b3dfd2c36
13
+ lib/doing/prompt.rb d320de9f309a9069725b9e90e19bae808839c06b
14
14
  lib/doing/string.rb f5cf48e2e700a038aa9edaafdee3066ba117e851
15
15
  lib/doing/symbol.rb 309799458a1bc715c2707307c9a62ab26086275e
16
16
  lib/doing/section.rb 206e119cf818f1e76798753e611180fe77bc299a
17
- lib/doing/version.rb 079364828584f1d873a6293da696f784f0196bda
17
+ lib/doing/version.rb 2bdd1caf85f391c64be4f792fe24f8ca017ebc54
18
18
  lib/doing/cli_status.rb dbedd454c4cbbd0fed9ef30120f6ec85d18b9356
19
19
  lib/doing/completion.rb c658e7dc7898fb022a21b2bd77bedb958ca3b067
20
20
  lib/doing/log_adapter.rb 267dc637bc9ea445dd07edb8b5dbbe374ff80b2b
@@ -23,8 +23,8 @@ lib/doing/configuration.rb 61c415e033c99355f5589e799344d60db42bd900
23
23
  lib/doing/phrase_parser.rb 8f1789d7cf8326d8cc231b4a21505a93f8de20d2
24
24
  lib/doing/array_chronify.rb 5852b38643aef2e7e796aaf19b2c052a52ee5e2b
25
25
  lib/doing/plugin_manager.rb cb16a82c3182ef7008359670ab96ff6b39270ccc
26
- lib/doing/string_chronify.rb e95c24717a2bc336be5effebc13f10b020c8e2d8
27
- lib/doing/template_string.rb 6dfb28b922059189b072e6d9fe1fcba8aad6c6fe
26
+ lib/doing/string_chronify.rb 62635041c94482927fb661ac0caa2eb9bdd1c17c
27
+ lib/doing/template_string.rb 5f6ef0495082339f2aa1b085ac4c1bdbfeb25be5
28
28
  lib/doing/numeric_chronify.rb bedeff62a95f8a8ff116e1bf0cc1d9eb2707a900
29
29
  lib/doing/boolean_term_parser.rb 075977892ac5c6e3435cb8877d8b8b68eb1962e3
30
30
  lib/doing/markdown_document_listener.rb 45485f225068a34951ec818a345f642323e5ba35
data/.yardoc/object_types CHANGED
Binary file
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ### 2.1.16
2
+
3
+ 2022-01-18 02:45
4
+
5
+ #### NEW
6
+
7
+ - `doing done --from "3pm to 3:15pm"` to set start and end times with natural language string
8
+
9
+ #### IMPROVED
10
+
11
+ - Running `doing tag` without arguments takes command line input
12
+ - If `doing now` or `doing later` are run without arguments, interactively request necessary information (you can still use --editor to edit in your preferred editor)
13
+ - Tab completion for tags when entering at prompt
14
+ - Use readline when requesting input text, better editing features
15
+ - `doing done --at` no longer overrides `--back`
16
+
17
+ #### FIXED
18
+
19
+ - `doing select` -> output formatted empty output
20
+ - Sort items by date when using `doing select --editor` (was loading in selection order instead)
21
+ - Ruby 2.7 error in template output (.empty? on FalseClass)
22
+ - Don't add empty entry when cancelling --editor
23
+ - Batch editing bugs
24
+
1
25
  ### 2.1.15
2
26
 
3
27
  2022-01-17 07:25
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- doing (2.1.15)
4
+ doing (2.1.16)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  deep_merge (~> 1.2, >= 1.2.1)
7
7
  gli (~> 2.19, >= 2.19.2)
data/README.md CHANGED
@@ -8,7 +8,7 @@ _If you're one of the rare people like me who find this useful, feel free to
8
8
 
9
9
  <!--README-->
10
10
 
11
- The current version of `doing` is <!--VER-->2.1.14<!--END VER-->.
11
+ The current version of `doing` is <!--VER-->2.1.15<!--END VER-->.
12
12
 
13
13
  Find all of the documentation in the [doing wiki][wiki].
14
14
 
data/bin/doing CHANGED
@@ -199,7 +199,7 @@ command %i[again resume] do |c|
199
199
  end
200
200
 
201
201
  note = Doing::Note.new(options[:note])
202
- note.add(Doing::Prompt.request_lines(prompt: 'Add a note')) if options[:ask]
202
+ note.add(Doing::Prompt.read_lines(prompt: 'Add a note')) if options[:ask]
203
203
 
204
204
  options[:note] = note
205
205
 
@@ -338,14 +338,21 @@ command %i[done did] do |c|
338
338
  c.switch %i[a archive], negatable: false, default_value: false
339
339
 
340
340
  c.desc %(Set finish date to specific date/time (natural langauge parsed, e.g. --at=1:30pm).
341
- If used, ignores --back. Used with --took, backdates start date)
341
+ Used with --took, backdates start date)
342
342
  c.arg_name 'DATE_STRING'
343
- c.flag [:at]
343
+ c.flag %i[at finished]
344
344
 
345
345
  c.desc 'Backdate start date by interval or set to time [4pm|20m|2h|"yesterday noon"]'
346
346
  c.arg_name 'DATE_STRING'
347
347
  c.flag %i[b back started]
348
348
 
349
+ c.desc %(
350
+ Start and end times as a date/time range `doing done --from "1am to 8am"`.
351
+ Overrides other date flags.
352
+ )
353
+ c.arg_name 'TIME_RANGE'
354
+ c.flag [:from]
355
+
349
356
  c.desc %(Set completion date to start date plus interval (XX[mhd] or HH:MM).
350
357
  If used without the --back option, the start date will be moved back to allow
351
358
  the completion date to be the current time.)
@@ -377,31 +384,40 @@ command %i[done did] do |c|
377
384
  took = 0
378
385
  donedate = nil
379
386
 
380
- if options[:took]
381
- took = options[:took].chronify_qty
382
- raise InvalidTimeExpression, 'Unable to parse date string for --took' if took.nil?
383
- end
384
-
385
- if options[:back]
386
- date = options[:back].chronify(guess: :begin)
387
- raise InvalidTimeExpression, 'Unable to parse date string for --back' if date.nil?
387
+ if options[:from]
388
+ date, finish_date = options[:from].split_date_range
389
+ finish_date ||= Time.now
388
390
  else
389
- date = options[:took] ? Time.now - took : Time.now
390
- end
391
+ if options[:took]
392
+ took = options[:took].chronify_qty
393
+ raise InvalidTimeExpression, 'Unable to parse date string for --took' if took.nil?
394
+ end
395
+
396
+ if options[:back]
397
+ date = options[:back].chronify(guess: :begin)
398
+ raise InvalidTimeExpression, 'Unable to parse date string for --back' if date.nil?
399
+ else
400
+ date = options[:took] ? Time.now - took : Time.now
401
+ end
391
402
 
392
- if options[:at]
393
- finish_date = options[:at].chronify(guess: :begin)
394
- raise InvalidTimeExpression, 'Unable to parse date string for --at' if finish_date.nil?
403
+ if options[:at]
404
+ finish_date = options[:at].chronify(guess: :begin)
405
+ raise InvalidTimeExpression, 'Unable to parse date string for --at' if finish_date.nil?
395
406
 
396
- date = options[:took] ? finish_date - took : finish_date
397
- elsif options[:took]
398
- finish_date = date + took
399
- else
400
- finish_date = Time.now
407
+ if options[:took]
408
+ date = finish_date - took
409
+ else
410
+ date ||= finish_date
411
+ end
412
+ elsif options[:took]
413
+ finish_date = date + took
414
+ else
415
+ finish_date = Time.now
416
+ end
401
417
  end
402
418
 
403
419
  if options[:date]
404
- finish_date = wwid.verify_duration(date, finish_date) unless options[:took]
420
+ finish_date = wwid.verify_duration(date, finish_date) unless options[:took] || options[:from]
405
421
 
406
422
  donedate = finish_date.strftime('%F %R')
407
423
  end
@@ -412,9 +428,13 @@ command %i[done did] do |c|
412
428
  section = settings['current_section']
413
429
  end
414
430
 
431
+
415
432
  note = Doing::Note.new
416
433
  note.add(options[:note]) if options[:note]
417
- note.add(Doing::Prompt.request_lines(prompt: 'Add a note')) if options[:ask]
434
+
435
+ if options[:ask] && !options[:editor]
436
+ note.add(Doing::Prompt.read_lines(prompt: 'Add a note'))
437
+ end
418
438
 
419
439
  if options[:editor]
420
440
  raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
@@ -440,6 +460,12 @@ command %i[done did] do |c|
440
460
  raise EmptyInput, 'No content' unless input && !input.empty?
441
461
 
442
462
  d, title, note = wwid.format_input(input)
463
+
464
+ if options[:ask]
465
+ ask_note = Doing::Prompt.read_lines(prompt: 'Add a note')
466
+ note.add(ask_note) unless ask_note.empty?
467
+ end
468
+
443
469
  date = d.nil? ? date : d
444
470
  new_entry = Doing::Item.new(date, title, section, note)
445
471
  if new_entry.should_finish?
@@ -483,12 +509,13 @@ command %i[done did] do |c|
483
509
  wwid.tag_last(opt)
484
510
  end
485
511
  elsif !args.empty?
486
- note = Doing::Note.new(options[:note])
487
512
  d, title, new_note = wwid.format_input([args.join(' '), note.strip_lines.join("\n")].join("\n"))
488
513
  date = d.nil? ? date : d
514
+ new_note.add(options[:note])
489
515
  title.chomp!
490
516
  section = 'Archive' if options[:archive]
491
517
  new_entry = Doing::Item.new(date, title, section, new_note)
518
+
492
519
  if new_entry.should_finish?
493
520
  if new_entry.should_time?
494
521
  new_entry.tag('done', value: donedate)
@@ -496,12 +523,14 @@ command %i[done did] do |c|
496
523
  new_entry.tag('done')
497
524
  end
498
525
  end
526
+
499
527
  Doing::Hooks.trigger :pre_entry_add, wwid, new_entry
500
528
  wwid.content.push(new_entry)
501
529
  Doing::Hooks.trigger :post_entry_added, wwid, new_entry.dup
502
530
  wwid.write(wwid.doing_file)
503
531
  Doing.logger.info('Entry Added:', new_entry.title)
504
532
  elsif $stdin.stat.size.positive?
533
+ note = Doing::Note.new(options[:note])
505
534
  d, title, note = wwid.format_input($stdin.read.strip)
506
535
  unless d.nil?
507
536
  Doing.logger.debug('Parser:', 'Date detected in input, overriding command line values')
@@ -711,22 +740,29 @@ command :later do |c|
711
740
  date = Time.now
712
741
  end
713
742
 
714
- ask_note = options[:ask] ? Doing::Prompt.request_lines(prompt: 'Add a note') : ''
743
+ ask_note = options[:ask] && !options[:editor] && args.count.positive? ? Doing::Prompt.read_lines(prompt: 'Add a note') : ''
715
744
 
716
- if options[:editor] || (args.empty? && $stdin.stat.size.zero?)
745
+ if options[:editor]
717
746
  raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
718
747
 
748
+ input = ''
719
749
  input += date.strftime('%F %R | ')
720
750
  input += args.empty? ? '' : args.join(' ')
721
751
  input += "\n#{options[:note]}" if options[:note]
722
752
  input += "\n#{ask_note}" unless ask_note.empty?
723
753
 
724
754
  input = wwid.fork_editor(input).strip
725
- raise EmptyInput, 'No content' unless input && !input.empty?
726
755
 
727
756
  d, title, note = wwid.format_input(input)
728
- date = d.nil? ? date : d
757
+ raise EmptyInput, 'No content' if title.empty?
758
+
729
759
  note.add(options[:note]) if options[:note]
760
+ if ask_note.empty? && options[:ask]
761
+ ask_note = Doing::Prompt.read_lines(prompt: 'Add a note')
762
+ note.add(ask_note) unless ask_note.empty?
763
+ end
764
+
765
+ date = d.nil? ? date : d
730
766
  wwid.add_item(title.cap_first, 'Later', { note: note, back: date })
731
767
  wwid.write(wwid.doing_file)
732
768
  elsif !args.empty?
@@ -747,7 +783,16 @@ command :later do |c|
747
783
  wwid.add_item(title.cap_first, 'Later', { note: note, back: date })
748
784
  wwid.write(wwid.doing_file)
749
785
  else
750
- raise EmptyInput, 'You must provide content when creating a new entry'
786
+ title = Doing::Prompt.read_line(prompt: 'Entry content')
787
+ raise EmptyInput, 'You must provide content when creating a new entry' if title.strip.empty?
788
+
789
+ note = Doing::Note.new
790
+ res = Doing::Prompt.yn('Add a note', default_response: false)
791
+ ask_note = res ? Doing::Prompt.read_lines(prompt: 'Enter note') : []
792
+ note.add(ask_note)
793
+
794
+ wwid.add_item(title.cap_first, 'Later', { note: note, back: date })
795
+ wwid.write(wwid.doing_file)
751
796
  end
752
797
  end
753
798
  end
@@ -929,7 +974,7 @@ command :meanwhile do |c|
929
974
  end
930
975
  input = ''
931
976
 
932
- ask_note = options[:ask] ? Doing::Prompt.request_lines(prompt: 'Add a note') : []
977
+ ask_note = options[:ask] ? Doing::Prompt.read_lines(prompt: 'Add a note') : []
933
978
 
934
979
  if options[:editor]
935
980
  raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
@@ -1053,7 +1098,7 @@ command :note do |c|
1053
1098
 
1054
1099
  last_note = last_entry.note || Doing::Note.new
1055
1100
  new_note = Doing::Note.new
1056
- ask_note = options[:ask] ? Doing::Prompt.request_lines(prompt: 'Add a note') : ''
1101
+ ask_note = options[:ask] ? Doing::Prompt.read_lines(prompt: 'Add a note') : ''
1057
1102
 
1058
1103
  if options[:editor] || (args.empty? && $stdin.stat.size.zero? && !options[:remove] && !options[:ask])
1059
1104
  raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
@@ -1103,10 +1148,13 @@ long_desc %(Record what you're starting now, or backdate the start time using na
1103
1148
 
1104
1149
  A parenthetical at the end of the entry will be converted to a note.
1105
1150
 
1106
- Run with no argument to create a new entry using #{Doing::Util.default_editor}.)
1151
+ Run without arguments to create a new entry interactively.
1152
+
1153
+ Run with --editor to create a new entry using #{Doing::Util.default_editor}.)
1107
1154
  arg_name 'ENTRY'
1108
1155
  command %i[now next] do |c|
1109
- c.example 'doing now', desc: "Open #{Doing::Util.default_editor} to input an entry and optional note."
1156
+ c.example 'doing now', desc: 'Create a new entry with interactive prompts'
1157
+ c.example 'doing now -e', desc: "Open #{Doing::Util.default_editor} to input an entry and optional note"
1110
1158
  c.example 'doing now working on a new project', desc: 'Add a new entry at the current time'
1111
1159
  c.example 'doing now debugging @project2', desc: 'Add an entry with a tag'
1112
1160
  c.example 'doing now adding an entry (with a note)', desc: 'Parenthetical at end is converted to note'
@@ -1152,9 +1200,9 @@ command %i[now next] do |c|
1152
1200
  options[:section] = settings['current_section']
1153
1201
  end
1154
1202
 
1155
- ask_note = options[:ask] ? Doing::Prompt.request_lines(prompt: 'Add a note') : ''
1203
+ ask_note = options[:ask] && !options[:editor] && args.count.positive? ? Doing::Prompt.read_lines(prompt: 'Add a note') : ''
1156
1204
 
1157
- if options[:editor] || (args.empty? && $stdin.stat.size.zero?)
1205
+ if options[:editor]
1158
1206
  raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
1159
1207
 
1160
1208
  input = date.strftime('%F %R | ')
@@ -1163,9 +1211,13 @@ command %i[now next] do |c|
1163
1211
  input += "\n#{ask_note}" unless ask_note.empty?
1164
1212
  input = wwid.fork_editor(input).strip
1165
1213
 
1166
- raise EmptyInput, 'No content' if input.empty?
1167
-
1168
1214
  date, title, note = wwid.format_input(input)
1215
+ raise EmptyInput, 'No content' if title.strip.empty?
1216
+
1217
+ if ask_note.empty? && options[:ask]
1218
+ ask_note = Doing::Prompt.read_lines(prompt: 'Add a note')
1219
+ note.add(ask_note) unless ask_note.empty?
1220
+ end
1169
1221
 
1170
1222
  wwid.add_item(title.cap_first, section, { note: note, back: date, timed: options[:finish_last] })
1171
1223
  wwid.write(wwid.doing_file)
@@ -1188,7 +1240,16 @@ command %i[now next] do |c|
1188
1240
  wwid.add_item(title.cap_first, section, { note: note, back: date, timed: options[:finish_last] })
1189
1241
  wwid.write(wwid.doing_file)
1190
1242
  else
1191
- raise EmptyInput, 'You must provide content when creating a new entry'
1243
+ title = Doing::Prompt.read_line(prompt: 'Entry content')
1244
+ raise EmptyInput, 'You must provide content when creating a new entry' if title.strip.empty?
1245
+
1246
+ note = Doing::Note.new
1247
+ res = Doing::Prompt.yn('Add a note', default_response: false)
1248
+ ask_note = res ? Doing::Prompt.read_lines(prompt: 'Enter note') : []
1249
+ note.add(ask_note)
1250
+
1251
+ wwid.add_item(title.cap_first, section, { note: note, back: date, timed: options[:finish_last] })
1252
+ wwid.write(wwid.doing_file)
1192
1253
  end
1193
1254
  end
1194
1255
  end
@@ -1511,7 +1572,7 @@ command :tag do |c|
1511
1572
 
1512
1573
  c.action do |_global_options, options, args|
1513
1574
  options[:fuzzy] = false
1514
- raise MissingArgument, 'You must specify at least one tag' if args.empty? && !options[:autotag]
1575
+ # raise MissingArgument, 'You must specify at least one tag' if args.empty? && !options[:autotag]
1515
1576
 
1516
1577
  raise InvalidArgument, '--search and --tag can not be used together' if options[:search] && options[:tag]
1517
1578
 
@@ -1531,11 +1592,15 @@ command :tag do |c|
1531
1592
  if options[:autotag]
1532
1593
  tags = []
1533
1594
  else
1534
- tags = if args.join('') =~ /,/
1535
- args.join('').split(/,/)
1536
- else
1537
- args.join(' ').split(' ') # in case tags are quoted as one arg
1538
- end
1595
+ if args.empty?
1596
+ tags = []
1597
+ else
1598
+ tags = if args.join('') =~ /,/
1599
+ args.join('').split(/ *, */)
1600
+ else
1601
+ args.join(' ').split(' ') # in case tags are quoted as one arg
1602
+ end
1603
+ end
1539
1604
 
1540
1605
  tags.map! { |tag| tag.sub(/^@/, '').strip }
1541
1606
  end
data/docs/doc/Array.html CHANGED
@@ -654,7 +654,7 @@ minutes]</p>
654
654
  </div>
655
655
 
656
656
  <div id="footer">
657
- Generated on Mon Jan 17 08:01:48 2022 by
657
+ Generated on Tue Jan 18 02:48:57 2022 by
658
658
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
659
659
  0.9.26 (ruby-3.0.1).
660
660
  </div>
@@ -283,7 +283,7 @@
283
283
  </div>
284
284
 
285
285
  <div id="footer">
286
- Generated on Mon Jan 17 08:01:48 2022 by
286
+ Generated on Tue Jan 18 02:48:58 2022 by
287
287
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
288
288
  0.9.26 (ruby-3.0.1).
289
289
  </div>
@@ -162,7 +162,7 @@
162
162
  </div>
163
163
 
164
164
  <div id="footer">
165
- Generated on Mon Jan 17 08:01:48 2022 by
165
+ Generated on Tue Jan 18 02:48:58 2022 by
166
166
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
167
167
  0.9.26 (ruby-3.0.1).
168
168
  </div>
@@ -407,7 +407,7 @@
407
407
  </div>
408
408
 
409
409
  <div id="footer">
410
- Generated on Mon Jan 17 08:01:48 2022 by
410
+ Generated on Tue Jan 18 02:48:58 2022 by
411
411
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
412
412
  0.9.26 (ruby-3.0.1).
413
413
  </div>
@@ -125,7 +125,7 @@ parser. In order to do that, a new &quot;clause&quot; node is added to the parse
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Mon Jan 17 08:01:48 2022 by
128
+ Generated on Tue Jan 18 02:48:58 2022 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
130
  0.9.26 (ruby-3.0.1).
131
131
  </div>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Mon Jan 17 08:01:48 2022 by
117
+ Generated on Tue Jan 18 02:48:58 2022 by
118
118
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
119
  0.9.26 (ruby-3.0.1).
120
120
  </div>
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Mon Jan 17 08:01:48 2022 by
108
+ Generated on Tue Jan 18 02:48:57 2022 by
109
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
110
  0.9.26 (ruby-3.0.1).
111
111
  </div>
@@ -508,7 +508,7 @@ ANSI-sequences are stripped from the string.</p>
508
508
  </div>
509
509
 
510
510
  <div id="footer">
511
- Generated on Mon Jan 17 08:01:48 2022 by
511
+ Generated on Tue Jan 18 02:48:57 2022 by
512
512
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
513
513
  0.9.26 (ruby-3.0.1).
514
514
  </div>
@@ -206,7 +206,7 @@ stdout</p>
206
206
  </div>
207
207
 
208
208
  <div id="footer">
209
- Generated on Mon Jan 17 08:01:48 2022 by
209
+ Generated on Tue Jan 18 02:48:57 2022 by
210
210
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
211
211
  0.9.26 (ruby-3.0.1).
212
212
  </div>
@@ -1104,7 +1104,7 @@ matched, first match wins)</p>
1104
1104
  </div>
1105
1105
 
1106
1106
  <div id="footer">
1107
- Generated on Mon Jan 17 08:01:48 2022 by
1107
+ Generated on Tue Jan 18 02:48:58 2022 by
1108
1108
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1109
1109
  0.9.26 (ruby-3.0.1).
1110
1110
  </div>
@@ -176,7 +176,7 @@
176
176
  </div>
177
177
 
178
178
  <div id="footer">
179
- Generated on Mon Jan 17 08:01:48 2022 by
179
+ Generated on Tue Jan 18 02:48:57 2022 by
180
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
181
  0.9.26 (ruby-3.0.1).
182
182
  </div>
@@ -176,7 +176,7 @@
176
176
  </div>
177
177
 
178
178
  <div id="footer">
179
- Generated on Mon Jan 17 08:01:48 2022 by
179
+ Generated on Tue Jan 18 02:48:57 2022 by
180
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
181
  0.9.26 (ruby-3.0.1).
182
182
  </div>
@@ -176,7 +176,7 @@
176
176
  </div>
177
177
 
178
178
  <div id="footer">
179
- Generated on Mon Jan 17 08:01:48 2022 by
179
+ Generated on Tue Jan 18 02:48:57 2022 by
180
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
181
  0.9.26 (ruby-3.0.1).
182
182
  </div>
@@ -176,7 +176,7 @@
176
176
  </div>
177
177
 
178
178
  <div id="footer">
179
- Generated on Mon Jan 17 08:01:48 2022 by
179
+ Generated on Tue Jan 18 02:48:57 2022 by
180
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
181
  0.9.26 (ruby-3.0.1).
182
182
  </div>
@@ -176,7 +176,7 @@
176
176
  </div>
177
177
 
178
178
  <div id="footer">
179
- Generated on Mon Jan 17 08:01:48 2022 by
179
+ Generated on Tue Jan 18 02:48:57 2022 by
180
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
181
  0.9.26 (ruby-3.0.1).
182
182
  </div>
@@ -238,7 +238,7 @@
238
238
  </div>
239
239
 
240
240
  <div id="footer">
241
- Generated on Mon Jan 17 08:01:48 2022 by
241
+ Generated on Tue Jan 18 02:48:57 2022 by
242
242
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
243
243
  0.9.26 (ruby-3.0.1).
244
244
  </div>
@@ -176,7 +176,7 @@
176
176
  </div>
177
177
 
178
178
  <div id="footer">
179
- Generated on Mon Jan 17 08:01:48 2022 by
179
+ Generated on Tue Jan 18 02:48:57 2022 by
180
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
181
  0.9.26 (ruby-3.0.1).
182
182
  </div>
@@ -176,7 +176,7 @@
176
176
  </div>
177
177
 
178
178
  <div id="footer">
179
- Generated on Mon Jan 17 08:01:48 2022 by
179
+ Generated on Tue Jan 18 02:48:57 2022 by
180
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
181
  0.9.26 (ruby-3.0.1).
182
182
  </div>
@@ -181,7 +181,7 @@
181
181
  </div>
182
182
 
183
183
  <div id="footer">
184
- Generated on Mon Jan 17 08:01:48 2022 by
184
+ Generated on Tue Jan 18 02:48:57 2022 by
185
185
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
186
186
  0.9.26 (ruby-3.0.1).
187
187
  </div>
@@ -354,7 +354,7 @@
354
354
  </div>
355
355
 
356
356
  <div id="footer">
357
- Generated on Mon Jan 17 08:01:48 2022 by
357
+ Generated on Tue Jan 18 02:48:57 2022 by
358
358
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
359
359
  0.9.26 (ruby-3.0.1).
360
360
  </div>
@@ -2077,7 +2077,7 @@ thus should not receive a date on the @done tag</p>
2077
2077
  </div>
2078
2078
 
2079
2079
  <div id="footer">
2080
- Generated on Mon Jan 17 08:01:48 2022 by
2080
+ Generated on Tue Jan 18 02:48:57 2022 by
2081
2081
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2082
2082
  0.9.26 (ruby-3.0.1).
2083
2083
  </div>
@@ -890,7 +890,7 @@ specified section</p>
890
890
  </div>
891
891
 
892
892
  <div id="footer">
893
- Generated on Mon Jan 17 08:01:48 2022 by
893
+ Generated on Tue Jan 18 02:48:57 2022 by
894
894
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
895
895
  0.9.26 (ruby-3.0.1).
896
896
  </div>
@@ -1797,7 +1797,7 @@ message (optional)</p>
1797
1797
  </div>
1798
1798
 
1799
1799
  <div id="footer">
1800
- Generated on Mon Jan 17 08:01:48 2022 by
1800
+ Generated on Tue Jan 18 02:48:58 2022 by
1801
1801
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1802
1802
  0.9.26 (ruby-3.0.1).
1803
1803
  </div>