doing 2.1.31pre → 2.1.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +58 -1
  3. data/Dockerfile-2.6 +3 -1
  4. data/Dockerfile-2.7 +4 -2
  5. data/Dockerfile-3.0 +3 -1
  6. data/Gemfile.lock +1 -71
  7. data/README.md +1 -1
  8. data/bash_profile +13 -0
  9. data/bin/commands/config.rb +16 -13
  10. data/bin/commands/done.rb +1 -1
  11. data/bin/commands/grep.rb +2 -29
  12. data/bin/commands/meanwhile.rb +1 -1
  13. data/bin/commands/now.rb +1 -1
  14. data/bin/commands/on.rb +6 -16
  15. data/bin/commands/open.rb +2 -2
  16. data/bin/commands/recent.rb +2 -14
  17. data/bin/commands/rotate.rb +17 -0
  18. data/bin/commands/sections.rb +82 -7
  19. data/bin/commands/show.rb +1 -21
  20. data/bin/commands/since.rb +5 -16
  21. data/bin/commands/tag_dir.rb +27 -3
  22. data/bin/commands/today.rb +3 -28
  23. data/bin/commands/yesterday.rb +2 -35
  24. data/bin/doing +9 -8
  25. data/docs/doc/Array.html +1 -1
  26. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  27. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  28. data/docs/doc/BooleanTermParser/Query.html +1 -1
  29. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  30. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  31. data/docs/doc/BooleanTermParser.html +1 -1
  32. data/docs/doc/Doing/Color.html +1 -1
  33. data/docs/doc/Doing/Completion.html +1 -1
  34. data/docs/doc/Doing/Configuration.html +3 -3
  35. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  36. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  37. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  38. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  39. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  40. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  41. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  42. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  43. data/docs/doc/Doing/Errors.html +1 -1
  44. data/docs/doc/Doing/Hooks.html +1 -1
  45. data/docs/doc/Doing/Item.html +20 -3
  46. data/docs/doc/Doing/Items.html +209 -1
  47. data/docs/doc/Doing/LogAdapter.html +1 -1
  48. data/docs/doc/Doing/Logger.html +1807 -0
  49. data/docs/doc/Doing/Note.html +1 -1
  50. data/docs/doc/Doing/Pager.html +1 -1
  51. data/docs/doc/Doing/Plugins.html +1 -1
  52. data/docs/doc/Doing/Prompt.html +1 -1
  53. data/docs/doc/Doing/Section.html +1 -1
  54. data/docs/doc/Doing/TemplateString.html +1 -1
  55. data/docs/doc/Doing/Types.html +3 -3
  56. data/docs/doc/Doing/Util/Backup.html +1 -1
  57. data/docs/doc/Doing/Util.html +1 -1
  58. data/docs/doc/Doing/WWID.html +3 -53
  59. data/docs/doc/Doing.html +4 -4
  60. data/docs/doc/FalseClass.html +1 -1
  61. data/docs/doc/GLI/Commands/Help.html +1 -1
  62. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  63. data/docs/doc/GLI/Commands.html +1 -1
  64. data/docs/doc/GLI.html +1 -1
  65. data/docs/doc/Hash.html +1 -1
  66. data/docs/doc/Object.html +1 -1
  67. data/docs/doc/PhraseParser/Operator.html +1 -1
  68. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  69. data/docs/doc/PhraseParser/Query.html +1 -1
  70. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  71. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  72. data/docs/doc/PhraseParser/TermClause.html +1 -1
  73. data/docs/doc/PhraseParser.html +1 -1
  74. data/docs/doc/Status.html +1 -1
  75. data/docs/doc/String.html +1 -1
  76. data/docs/doc/Symbol.html +1 -1
  77. data/docs/doc/Time.html +1 -1
  78. data/docs/doc/TrueClass.html +1 -1
  79. data/docs/doc/_index.html +10 -10
  80. data/docs/doc/class_list.html +1 -1
  81. data/docs/doc/file.README.html +2 -2
  82. data/docs/doc/index.html +2 -2
  83. data/docs/doc/method_list.html +407 -383
  84. data/docs/doc/top-level-namespace.html +1 -1
  85. data/docs/index.md +1 -1
  86. data/doing.gemspec +23 -24
  87. data/doing.rdoc +235 -18
  88. data/inputrc +57 -0
  89. data/lib/completion/_doing.zsh +47 -51
  90. data/lib/completion/doing.bash +12 -23
  91. data/lib/completion/doing.fish +39 -12
  92. data/lib/doing/add_options.rb +36 -1
  93. data/lib/doing/changelog/changes.rb +1 -1
  94. data/lib/doing/chronify/string.rb +1 -1
  95. data/lib/doing/completion/bash_completion.rb +1 -1
  96. data/lib/doing/completion/fish_completion.rb +2 -2
  97. data/lib/doing/completion/zsh_completion.rb +10 -4
  98. data/lib/doing/configuration.rb +7 -1
  99. data/lib/doing/item.rb +9 -2
  100. data/lib/doing/items.rb +48 -0
  101. data/lib/doing/{log_adapter.rb → logger.rb} +8 -2
  102. data/lib/doing/plugins/import/calendar_import.rb +1 -1
  103. data/lib/doing/plugins/import/doing_import.rb +1 -1
  104. data/lib/doing/plugins/import/timing_import.rb +1 -1
  105. data/lib/doing/string/tags.rb +1 -1
  106. data/lib/doing/types.rb +2 -2
  107. data/lib/doing/version.rb +1 -1
  108. data/lib/doing/wwid.rb +43 -43
  109. data/lib/doing.rb +4 -4
  110. data/lib/examples/plugins/capture_thing_import.rb +1 -1
  111. data/lib/helpers/threaded_tests.rb +2 -0
  112. metadata +101 -138
  113. data/.yardoc/checksums +0 -30
  114. data/.yardoc/complete +0 -0
  115. data/.yardoc/object_types +0 -0
  116. data/.yardoc/objects/root.dat +0 -0
  117. data/.yardoc/proxy_types +0 -0
  118. data/bin/commands/add_section.rb +0 -15
@@ -135,7 +135,6 @@ end
135
135
 
136
136
  __fish_doing_complete_args tag
137
137
 
138
- complete -xc doing -n '__fish_doing_needs_command' -a 'add_section' -d Add\ a\ new\ section\ to\ the\ \"doing\"\ file
139
138
  complete -xc doing -n '__fish_doing_needs_command' -a 'again resume' -d Repeat\ last\ entry\ as\ new\ entry
140
139
  complete -xc doing -n '__fish_doing_needs_command' -a 'archive move' -d Move\ entries\ between\ sections
141
140
  complete -xc doing -n '__fish_doing_needs_command' -a 'autotag' -d Autotag\ last\ entry\ or\ filtered\ entries
@@ -162,7 +161,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'recent' -d List\ recent\
162
161
  complete -xc doing -n '__fish_doing_needs_command' -a 'redo' -d Redo\ an\ undo\ command
163
162
  complete -xc doing -n '__fish_doing_needs_command' -a 'reset begin' -d Reset\ the\ start\ time\ of\ an\ entry
164
163
  complete -xc doing -n '__fish_doing_needs_command' -a 'rotate' -d Move\ entries\ to\ archive\ file
165
- complete -xc doing -n '__fish_doing_needs_command' -a 'sections' -d List\ sections
164
+ complete -xc doing -n '__fish_doing_needs_command' -a 'sections' -d List
166
165
  complete -xc doing -n '__fish_doing_needs_command' -a 'select' -d Display\ an\ interactive\ menu\ to\ perform\ operations
167
166
  complete -xc doing -n '__fish_doing_needs_command' -a 'show' -d List\ all\ entries
168
167
  complete -xc doing -n '__fish_doing_needs_command' -a 'since' -d List\ entries\ since\ a\ date
@@ -268,7 +267,7 @@ complete -c doing -l val -f -r -n '__fish_doing_using_command finish' -d Perfor
268
267
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command finish' -d Force\ exact\ search\ string\ matching
269
268
  complete -c doing -l after -f -r -n '__fish_doing_using_command grep search' -d Search\ entries\ newer\ than\ date
270
269
  complete -c doing -l before -f -r -n '__fish_doing_using_command grep search' -d Search\ entries\ older\ than\ date
271
- complete -c doing -l bool -f -r -n '__fish_doing_using_command grep search' -d Combine\ multiple\ tags\ or\ value\ queries\ using\ AND
270
+ complete -c doing -l bool -f -r -n '__fish_doing_using_command grep search' -d Boolean\ used\ to\ combine\ multiple\ tags
272
271
  complete -c doing -l case -f -r -n '__fish_doing_using_command grep search' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
273
272
  complete -c doing -l config_template -f -r -n '__fish_doing_using_command grep search' -d Output\ using\ a\ template\ from\ configuration
274
273
  complete -c doing -l delete -s d -f -n '__fish_doing_using_command grep search' -d Delete\ matching\ entries
@@ -277,14 +276,16 @@ complete -c doing -l editor -s e -f -n '__fish_doing_using_command grep search'
277
276
  complete -c doing -l from -f -r -n '__fish_doing_using_command grep search' -d Date\ range
278
277
  complete -c doing -l hilite -s h -f -n '__fish_doing_using_command grep search' -d Highlight\ search\ matches\ in\ output
279
278
  complete -c doing -l interactive -s i -f -n '__fish_doing_using_command grep search' -d Display\ an\ interactive\ menu\ of\ results\ to\ perform\ further\ operations
280
- complete -c doing -l not -f -n '__fish_doing_using_command grep search' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string
279
+ complete -c doing -l not -f -n '__fish_doing_using_command grep search' -d Search\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
281
280
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command grep search' -d Output\ to\ export\ format
282
281
  complete -c doing -l only_timed -f -n '__fish_doing_using_command grep search' -d Only\ show\ items\ with\ recorded\ time\ intervals
283
282
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command grep search' -d Section
284
283
  complete -c doing -l times -s t -f -n '__fish_doing_using_command grep search' -d Show\ time\ intervals\ on\ @done\ tasks
284
+ complete -c doing -l tag -f -r -n '__fish_doing_using_command grep search' -d Filter\ entries\ by\ tag
285
+ complete -c doing -l tag_order -f -r -n '__fish_doing_using_command grep search' -d Tag\ sort\ direction
285
286
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command grep search' -d Sort\ tags\ by
286
287
  complete -c doing -l template -f -r -n '__fish_doing_using_command grep search' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
287
- complete -c doing -l totals -f -n '__fish_doing_using_command grep search' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
288
+ complete -c doing -l totals -f -n '__fish_doing_using_command grep search' -d Show\ time\ totals\ at\ the\ end\ of\ output
288
289
  complete -c doing -l val -f -r -n '__fish_doing_using_command grep search' -d Perform\ a\ tag\ value\ query
289
290
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command grep search' -d Force\ exact\ string\ matching
290
291
  complete -c doing -F -n '__fish_doing_using_command import'
@@ -357,14 +358,26 @@ complete -c doing -l finish_last -s f -f -n '__fish_doing_using_command now nex
357
358
  complete -c doing -l from -f -r -n '__fish_doing_using_command now next' -d Set\ a\ start\ and\ optionally\ end\ time\ as\ a\ date\ range
358
359
  complete -c doing -l note -s n -f -r -n '__fish_doing_using_command now next' -d Include\ a\ note
359
360
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command now next' -d Section
361
+ complete -c doing -l after -f -r -n '__fish_doing_using_command on' -d View\ entries\ after\ specified\ time
362
+ complete -c doing -l before -f -r -n '__fish_doing_using_command on' -d View\ entries\ before\ specified\ time
363
+ complete -c doing -l bool -f -r -n '__fish_doing_using_command on' -d Boolean\ used\ to\ combine\ multiple\ tags
364
+ complete -c doing -l case -f -r -n '__fish_doing_using_command on' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
360
365
  complete -c doing -l config_template -f -r -n '__fish_doing_using_command on' -d Output\ using\ a\ template\ from\ configuration
361
366
  complete -c doing -l duration -f -n '__fish_doing_using_command on' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
367
+ complete -c doing -l from -f -r -n '__fish_doing_using_command on' -d Time\ range\ to\ show\ \`doing\ on\ --from\ \"12pm\ to\ 4pm\"\`
368
+ complete -c doing -l not -f -n '__fish_doing_using_command on' -d Show\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
362
369
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command on' -d Output\ to\ export\ format
370
+ complete -c doing -l only_timed -f -n '__fish_doing_using_command on' -d Only\ show\ items\ with\ recorded\ time\ intervals
363
371
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command on' -d Section
372
+ complete -c doing -l search -f -r -n '__fish_doing_using_command on' -d Filter\ entries\ using\ a\ search\ query
364
373
  complete -c doing -l times -s t -f -n '__fish_doing_using_command on' -d Show\ time\ intervals\ on\ @done\ tasks
374
+ complete -c doing -l tag -f -r -n '__fish_doing_using_command on' -d Filter\ entries\ by\ tag
375
+ complete -c doing -l tag_order -f -r -n '__fish_doing_using_command on' -d Tag\ sort\ direction
365
376
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command on' -d Sort\ tags\ by
366
377
  complete -c doing -l template -f -r -n '__fish_doing_using_command on' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
367
378
  complete -c doing -l totals -f -n '__fish_doing_using_command on' -d Show\ time\ totals\ at\ the\ end\ of\ output
379
+ complete -c doing -l val -f -r -n '__fish_doing_using_command on' -d Perform\ a\ tag\ value\ query
380
+ complete -c doing -l exact -s x -f -n '__fish_doing_using_command on' -d Force\ exact\ search\ string\ matching
368
381
  complete -c doing -l app -s a -f -r -n '__fish_doing_using_command open' -d Open\ with\ app\ name
369
382
  complete -c doing -l bundle_id -s b -f -r -n '__fish_doing_using_command open' -d Open\ with\ app\ bundle\ id
370
383
  complete -c doing -l editor -s e -f -r -n '__fish_doing_using_command open' -d Open\ with\ editor\ command
@@ -373,11 +386,13 @@ complete -c doing -l type -s t -f -r -n '__fish_doing_using_command plugins' -d
373
386
  complete -c doing -l config_template -f -r -n '__fish_doing_using_command recent' -d Output\ using\ a\ template\ from\ configuration
374
387
  complete -c doing -l duration -f -n '__fish_doing_using_command recent' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
375
388
  complete -c doing -l interactive -s i -f -n '__fish_doing_using_command recent' -d Select\ from\ a\ menu\ of\ matching\ entries\ to\ perform\ additional\ operations
389
+ complete -c doing -l only_timed -f -n '__fish_doing_using_command recent' -d Only\ show\ items\ with\ recorded\ time\ intervals
376
390
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command recent' -d Section
377
391
  complete -c doing -l times -s t -f -n '__fish_doing_using_command recent' -d Show\ time\ intervals\ on\ @done\ tasks
392
+ complete -c doing -l tag_order -f -r -n '__fish_doing_using_command recent' -d Tag\ sort\ direction
378
393
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command recent' -d Sort\ tags\ by
379
394
  complete -c doing -l template -f -r -n '__fish_doing_using_command recent' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
380
- complete -c doing -l totals -f -n '__fish_doing_using_command recent' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
395
+ complete -c doing -l totals -f -n '__fish_doing_using_command recent' -d Show\ time\ totals\ at\ the\ end\ of\ output
381
396
  complete -c doing -l file -s f -f -r -n '__fish_doing_using_command redo' -d Specify\ alternate\ doing\ file
382
397
  complete -c doing -l interactive -s i -f -n '__fish_doing_using_command redo' -d Select\ from\ an\ interactive\ menu
383
398
  complete -c doing -l bool -f -r -n '__fish_doing_using_command reset begin' -d Boolean\ used\ to\ combine\ multiple\ tags
@@ -400,7 +415,6 @@ complete -c doing -l search -f -r -n '__fish_doing_using_command rotate' -d Fil
400
415
  complete -c doing -l tag -f -r -n '__fish_doing_using_command rotate' -d Filter\ entries\ by\ tag
401
416
  complete -c doing -l val -f -r -n '__fish_doing_using_command rotate' -d Perform\ a\ tag\ value\ query
402
417
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command rotate' -d Force\ exact\ search\ string\ matching
403
- complete -c doing -l column -s c -f -n '__fish_doing_using_command sections' -d List\ in\ single\ column
404
418
  complete -c doing -l archive -s a -f -n '__fish_doing_using_command select' -d Archive\ selected\ items
405
419
  complete -c doing -l after -f -r -n '__fish_doing_using_command select' -d Select\ entries\ newer\ than\ date
406
420
  complete -c doing -l resume -f -n '__fish_doing_using_command select' -d Copy\ selection\ as\ a\ new\ entry\ with\ current\ time\ and\ no\ @done\ tag
@@ -447,17 +461,26 @@ complete -c doing -l tag -f -r -n '__fish_doing_using_command show' -d Filter\
447
461
  complete -c doing -l tag_order -f -r -n '__fish_doing_using_command show' -d Tag\ sort\ direction
448
462
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command show' -d Sort\ tags\ by
449
463
  complete -c doing -l template -f -r -n '__fish_doing_using_command show' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
450
- complete -c doing -l totals -f -n '__fish_doing_using_command show' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
464
+ complete -c doing -l totals -f -n '__fish_doing_using_command show' -d Show\ time\ totals\ at\ the\ end\ of\ output
451
465
  complete -c doing -l val -f -r -n '__fish_doing_using_command show' -d Perform\ a\ tag\ value\ query
452
466
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command show' -d Force\ exact\ search\ string\ matching
467
+ complete -c doing -l bool -f -r -n '__fish_doing_using_command since' -d Boolean\ used\ to\ combine\ multiple\ tags
468
+ complete -c doing -l case -f -r -n '__fish_doing_using_command since' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
453
469
  complete -c doing -l config_template -f -r -n '__fish_doing_using_command since' -d Output\ using\ a\ template\ from\ configuration
454
470
  complete -c doing -l duration -f -n '__fish_doing_using_command since' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
471
+ complete -c doing -l not -f -n '__fish_doing_using_command since' -d Since\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
455
472
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command since' -d Output\ to\ export\ format
473
+ complete -c doing -l only_timed -f -n '__fish_doing_using_command since' -d Only\ show\ items\ with\ recorded\ time\ intervals
456
474
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command since' -d Section
475
+ complete -c doing -l search -f -r -n '__fish_doing_using_command since' -d Filter\ entries\ using\ a\ search\ query
457
476
  complete -c doing -l times -s t -f -n '__fish_doing_using_command since' -d Show\ time\ intervals\ on\ @done\ tasks
477
+ complete -c doing -l tag -f -r -n '__fish_doing_using_command since' -d Filter\ entries\ by\ tag
478
+ complete -c doing -l tag_order -f -r -n '__fish_doing_using_command since' -d Tag\ sort\ direction
458
479
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command since' -d Sort\ tags\ by
459
480
  complete -c doing -l template -f -r -n '__fish_doing_using_command since' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
460
481
  complete -c doing -l totals -f -n '__fish_doing_using_command since' -d Show\ time\ totals\ at\ the\ end\ of\ output
482
+ complete -c doing -l val -f -r -n '__fish_doing_using_command since' -d Perform\ a\ tag\ value\ query
483
+ complete -c doing -l exact -s x -f -n '__fish_doing_using_command since' -d Force\ exact\ search\ string\ matching
461
484
  complete -c doing -l autotag -s a -f -n '__fish_doing_using_command tag' -d Autotag\ entries\ based\ on\ autotag\ configuration\ in\ \~/
462
485
  complete -c doing -l bool -f -r -n '__fish_doing_using_command tag' -d Boolean\ used\ to\ combine\ multiple\ tags
463
486
  complete -c doing -l count -s c -f -r -n '__fish_doing_using_command tag' -d How\ many\ recent\ entries\ to\ tag
@@ -500,8 +523,10 @@ complete -c doing -l config_template -f -r -n '__fish_doing_using_command today
500
523
  complete -c doing -l duration -f -n '__fish_doing_using_command today' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
501
524
  complete -c doing -l from -f -r -n '__fish_doing_using_command today' -d Time\ range\ to\ show\ \`doing\ today\ --from\ \"12pm\ to\ 4pm\"\`
502
525
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command today' -d Output\ to\ export\ format
526
+ complete -c doing -l only_timed -f -n '__fish_doing_using_command today' -d Only\ show\ items\ with\ recorded\ time\ intervals
503
527
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command today' -d Specify\ a\ section
504
528
  complete -c doing -l times -s t -f -n '__fish_doing_using_command today' -d Show\ time\ intervals\ on\ @done\ tasks
529
+ complete -c doing -l tag_order -f -r -n '__fish_doing_using_command today' -d Tag\ sort\ direction
505
530
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command today' -d Sort\ tags\ by
506
531
  complete -c doing -l template -f -r -n '__fish_doing_using_command today' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
507
532
  complete -c doing -l totals -f -n '__fish_doing_using_command today' -d Show\ time\ totals\ at\ the\ end\ of\ output
@@ -545,8 +570,9 @@ complete -c doing -l after -f -r -n '__fish_doing_using_command yesterday' -d V
545
570
  complete -c doing -l before -f -r -n '__fish_doing_using_command yesterday' -d View\ entries\ before\ specified\ time
546
571
  complete -c doing -l config_template -f -r -n '__fish_doing_using_command yesterday' -d Output\ using\ a\ template\ from\ configuration
547
572
  complete -c doing -l duration -f -n '__fish_doing_using_command yesterday' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
548
- complete -c doing -l from -f -r -n '__fish_doing_using_command yesterday' -d Time\ range\ to\ show
573
+ complete -c doing -l from -f -r -n '__fish_doing_using_command yesterday' -d Time\ range\ to\ show\ \`doing\ yesterday\ --from\ \"12pm\ to\ 4pm\"\`
549
574
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command yesterday' -d Output\ to\ export\ format
575
+ complete -c doing -l only_timed -f -n '__fish_doing_using_command yesterday' -d Only\ show\ items\ with\ recorded\ time\ intervals
550
576
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command yesterday' -d Specify\ a\ section
551
577
  complete -c doing -l times -s t -f -n '__fish_doing_using_command yesterday' -d Show\ time\ intervals\ on\ @done\ tasks
552
578
  complete -c doing -l tag_order -f -r -n '__fish_doing_using_command yesterday' -d Tag\ sort\ direction
@@ -554,9 +580,10 @@ complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command yesterday' -
554
580
  complete -c doing -l template -f -r -n '__fish_doing_using_command yesterday' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
555
581
  complete -c doing -l totals -f -n '__fish_doing_using_command yesterday' -d Show\ time\ totals\ at\ the\ end\ of\ output
556
582
  complete -f -c doing -s o -l output -x -n '__fish_doing_using_command grep search on select show since today view yesterday' -a '(__fish_doing_export_plugin)'
557
- complete -f -c doing -s b -l bool -x -n '__fish_doing_using_command again resume archive move autotag cancel finish grep search last mark flag note reset begin rotate show tag tags view wiki' -a 'and or not pattern'
558
- complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel changes changelog finish grep search import last mark flag note reset begin rotate select show show tag tags tags view' -a 'case-sensitive ignore smart'
583
+ complete -f -c doing -s b -l bool -x -n '__fish_doing_using_command again resume archive move autotag cancel finish grep search last mark flag note on reset begin rotate show since tag tags view wiki' -a 'and or not pattern'
584
+ complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel finish grep search import last mark flag note on reset begin rotate select show since tag tags view' -a 'case-sensitive ignore smart'
585
+ complete -f -c doing -l sort -x -n '__fish_doing_using_command changes changelog show tags' -a 'asc desc'
559
586
  complete -f -c doing -l tag_sort -x -n '__fish_doing_using_command grep search on recent show since today view yesterday' -a 'name time'
560
- complete -f -c doing -l tag_order -x -n '__fish_doing_using_command show view yesterday' -a 'asc desc'
587
+ complete -f -c doing -l tag_order -x -n '__fish_doing_using_command grep search on recent show since today view yesterday' -a 'asc desc'
561
588
  complete -f -c doing -s a -l age -x -n '__fish_doing_using_command show view' -a 'oldest newest'
562
589
  complete -f -c doing -s s -l section -x -n '__fish_doing_using_command again resume autotag cancel done did finish grep search import last mark flag meanwhile note now next on recent reset begin rotate select since tag tags today view wiki yesterday' -a '(__fish_doing_complete_sections)'
@@ -23,7 +23,7 @@ def add_options(type, cmd)
23
23
  'Search'
24
24
  when /mark/
25
25
  'Flag'
26
- when /(last|tags|view)/
26
+ when /(last|tags|view|on)/
27
27
  'Show'
28
28
  else
29
29
  cmd_name.capitalize
@@ -61,6 +61,27 @@ def add_options(type, cmd)
61
61
 
62
62
  cmd.desc 'Force exact search string matching (case sensitive)'
63
63
  cmd.switch %i[x exact], default_value: Doing.config.exact_match?, negatable: Doing.config.exact_match?
64
+ when :time_display
65
+ cmd.desc 'Show time intervals on @done tasks'
66
+ cmd.switch %i[t times], default_value: true, negatable: true
67
+
68
+ cmd.desc 'Show elapsed time on entries without @done tag'
69
+ cmd.switch [:duration]
70
+
71
+ cmd.desc 'Show time totals at the end of output'
72
+ cmd.switch [:totals], default_value: false, negatable: false
73
+
74
+ cmd.desc 'Sort tags by (name|time)'
75
+ default = Doing.setting('tag_sort').normalize_tag_sort || :name
76
+ cmd.arg_name 'KEY'
77
+ cmd.flag [:tag_sort], must_match: REGEX_TAG_SORT, default_value: default, type: TagSortSymbol
78
+
79
+ cmd.desc 'Tag sort direction (asc|desc)'
80
+ cmd.arg_name 'DIRECTION'
81
+ cmd.flag [:tag_order], must_match: REGEX_SORT_ORDER, default_value: :asc, type: OrderSymbol
82
+
83
+ cmd.desc 'Only show items with recorded time intervals'
84
+ cmd.switch [:only_timed], default_value: false, negatable: false
64
85
  when :tag_filter
65
86
  cmd.desc 'Filter entries by tag. Combine multiple tags with a comma. Wildcards allowed (*, ?)'
66
87
  cmd.arg_name 'TAG'
@@ -79,6 +100,20 @@ def add_options(type, cmd)
79
100
  cmd.flag [:bool], must_match: REGEX_BOOL,
80
101
  default_value: :pattern,
81
102
  type: BooleanSymbol
103
+ when :time_filter
104
+ cmd.desc 'View entries before specified time (e.g. 8am, 12:30pm, 15:00)'
105
+ cmd.arg_name 'TIME_STRING'
106
+ cmd.flag [:before], type: DateEndString
107
+
108
+ cmd.desc 'View entries after specified time (e.g. 8am, 12:30pm, 15:00)'
109
+ cmd.arg_name 'TIME_STRING'
110
+ cmd.flag [:after], type: DateBeginString
111
+
112
+ cmd.desc %(
113
+ Time range to show `doing #{cmd.name} --from "12pm to 4pm"`
114
+ )
115
+ cmd.arg_name 'TIME_RANGE'
116
+ cmd.flag [:from], type: DateRangeString, must_match: REGEX_TIME_RANGE
82
117
  when :date_filter
83
118
  if action =~ /Archive/
84
119
  cmd.desc 'Archive entries older than date (natural language).'
@@ -43,7 +43,7 @@ module Doing
43
43
 
44
44
  def to_s
45
45
  if @changes_only
46
- @changes.map(&:changes_only).join().force_encoding('utf-8')
46
+ @changes.map(&:changes_only).delete_if(&:empty?).join().gsub(/\n+/, "\n").force_encoding('utf-8')
47
47
  else
48
48
  @changes.map(&:to_s).join("\n\n").force_encoding('utf-8')
49
49
  end
@@ -200,7 +200,7 @@ module Doing
200
200
  else
201
201
  if date_string.strip =~ time_rx
202
202
  start = date_string.strip
203
- finish = nil
203
+ finish = '11:59pm'
204
204
  else
205
205
  start = date_string.strip.chronify(guess: :begin, future: false)
206
206
  finish = date_string.strip.chronify(guess: :end)
@@ -126,7 +126,7 @@ module Doing
126
126
  data = Completion.get_help_sections
127
127
  @global_options = Completion.parse_options(data[:global_options])
128
128
  @commands = Completion.parse_commands(data[:commands])
129
- @bar = TTY::ProgressBar.new("\033[0;0;33mGenerating Bash completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :box, hide_cursor: true, status: 'Reading subcommands')
129
+ @bar = TTY::ProgressBar.new("\033[0;0;33mGenerating Bash completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :square, hide_cursor: true, status: 'Reading subcommands')
130
130
  width = TTY::Screen.columns - 45
131
131
  @bar.resize(width)
132
132
  end
@@ -183,7 +183,7 @@ module Doing
183
183
  need_export.concat(cmd[:commands]) if option[:long] == 'output'
184
184
  need_bool.concat(cmd[:commands]) if option[:long] == 'bool'
185
185
  need_case.concat(cmd[:commands]) if option[:long] == 'case'
186
- need_case.concat(cmd[:commands]) if option[:long] == 'sort'
186
+ need_sort.concat(cmd[:commands]) if option[:long] == 'sort'
187
187
  need_tag_sort.concat(cmd[:commands]) if option[:long] == 'tag_sort'
188
188
  need_tag_order.concat(cmd[:commands]) if option[:long] == 'tag_order'
189
189
  need_age.concat(cmd[:commands]) if option[:long] == 'age'
@@ -232,7 +232,7 @@ module Doing
232
232
  data = Completion.get_help_sections
233
233
  @global_options = Completion.parse_options(data[:global_options])
234
234
  @commands = Completion.parse_commands(data[:commands])
235
- @bar = TTY::ProgressBar.new("\033[0;0;33mGenerating Fish completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :block, hide_cursor: true, status: 'processing subcommands')
235
+ @bar = TTY::ProgressBar.new("\033[0;0;33mGenerating Fish completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :square, hide_cursor: true, status: 'processing subcommands')
236
236
  width = TTY::Screen.columns - 45
237
237
  @bar.resize(width)
238
238
  end
@@ -2,6 +2,12 @@
2
2
 
3
3
  module Doing
4
4
  module Completion
5
+ class ::String
6
+ def sanitize
7
+ gsub(/'/, '\\\'').gsub(/\[/, '(').gsub(/\]/, ')')
8
+ end
9
+ end
10
+
5
11
  # Generate completions for zsh
6
12
  class ZshCompletions
7
13
  attr_accessor :commands, :global_options
@@ -65,12 +71,12 @@ module Doing
65
71
  Completion.parse_options(data[:command_options]).each do |option|
66
72
  next if option.nil?
67
73
 
68
- arg = option[:arg] ? '=' : ''
74
+ arg = option[:arg] ? ":#{option[:arg]}:" : ''
69
75
 
70
76
  option_arr << if option[:short]
71
- %({-#{option[:short]},--#{option[:long]}#{arg}}"[#{option[:description].gsub(/'/, '\\\'')}]")
77
+ %({'(--#{option[:long]})-#{option[:short]}','(-#{option[:short]})--#{option[:long]}'}"[#{option[:description].sanitize}]#{arg}")
72
78
  else
73
- %("(--#{option[:long]}#{arg})--#{option[:long]}#{arg}}[#{option[:description].gsub(/'/, '\\\'')}]")
79
+ %("--#{option[:long]}[#{option[:description].sanitize}]#{arg}")
74
80
  end
75
81
  end
76
82
  end
@@ -87,7 +93,7 @@ module Doing
87
93
  data = Completion.get_help_sections
88
94
  @global_options = Completion.parse_options(data[:global_options])
89
95
  @commands = Completion.parse_commands(data[:commands])
90
- @bar = TTY::ProgressBar.new(" \033[0;0;33mGenerating Zsh completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :block, hide_cursor: true, status: 'processing subcommands')
96
+ @bar = TTY::ProgressBar.new(" \033[0;0;33mGenerating Zsh completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :square, hide_cursor: true, status: 'processing subcommands')
91
97
  width = TTY::Screen.columns - 45
92
98
  @bar.resize(width)
93
99
  end
@@ -156,7 +156,13 @@ module Doing
156
156
  ##
157
157
  ## @return [String] file path
158
158
  ##
159
- def choose_config(create: false)
159
+ def choose_config(create: false, local: false)
160
+ if local && create
161
+ res = File.expand_path('.doingrc')
162
+ FileUtils.touch(res)
163
+ return res
164
+ end
165
+
160
166
  return @config_file if @force_answer
161
167
 
162
168
  if @additional_configs&.count&.positive? || create
data/lib/doing/item.rb CHANGED
@@ -35,6 +35,8 @@ module Doing
35
35
 
36
36
  ## If the entry doesn't have a @done date, return the elapsed time
37
37
  def duration
38
+ return nil unless should_time? && should_finish?
39
+
38
40
  return nil if @title =~ /(?<=^| )@done\b/
39
41
 
40
42
  return Time.now - @date
@@ -88,17 +90,20 @@ module Doing
88
90
  ##
89
91
  ## Test for equality between items
90
92
  ##
91
- ## @param other [Item] The other item
93
+ ## @param other [Item] The other item
94
+ ## @param match_section [Boolean] If true, require item sections to match
92
95
  ##
93
96
  ## @return [Boolean] is equal?
94
97
  ##
95
- def equal?(other)
98
+ def equal?(other, match_section: false)
96
99
  return false if @title.strip != other.title.strip
97
100
 
98
101
  return false if @date != other.date
99
102
 
100
103
  return false unless @note.equal?(other.note)
101
104
 
105
+ return false if match_section && @section != other.section
106
+
102
107
  true
103
108
  end
104
109
 
@@ -469,6 +474,8 @@ module Doing
469
474
  end
470
475
 
471
476
  def calc_interval
477
+ return nil unless should_time? && should_finish?
478
+
472
479
  done = end_date
473
480
  return nil if done.nil?
474
481
 
data/lib/doing/items.rb CHANGED
@@ -58,6 +58,24 @@ module Doing
58
58
  Doing.logger.info('New section:', %("#{section}" added)) if log
59
59
  end
60
60
 
61
+ def delete_section(section, log: false)
62
+ return unless section?(section)
63
+
64
+ raise DoingRuntimeError, 'Section not empty' if in_section(section).count > 0
65
+
66
+ deleted = false
67
+
68
+ @sections.each do |sect|
69
+ if sect.title == section && in_section(sect).count.zero?
70
+ @sections.delete(sect)
71
+ Doing.logger.info('Removed section:', %("#{section}" removed)) if log
72
+ return
73
+ end
74
+ end
75
+
76
+ Doing.logger.error('Not found:', %("#{section}" not found))
77
+ end
78
+
61
79
  # Get a new Items object containing only items in a
62
80
  # specified section
63
81
  #
@@ -126,6 +144,36 @@ module Doing
126
144
  diff
127
145
  end
128
146
 
147
+ ##
148
+ ## Remove duplicated entries. Duplicate entries must have matching start date, title, note, and section
149
+ ##
150
+ ## @return [Items] Items array with duplicate entries removed
151
+ ##
152
+ def dedup(match_section: true)
153
+ unique = Items.new
154
+ each do |item|
155
+ unique.push(item) unless unique.include?(item, match_section: match_section)
156
+ end
157
+
158
+ unique
159
+ end
160
+
161
+ def dedup!(match_section: true)
162
+ replace dedup(match_section: match_section)
163
+ end
164
+
165
+ def include?(item, match_section: true)
166
+ includes = false
167
+ each do |other_item|
168
+ if other_item.equal?(item, match_section: match_section)
169
+ includes = true
170
+ break
171
+ end
172
+ end
173
+
174
+ includes
175
+ end
176
+
129
177
  # Output sections and items in Doing file format
130
178
  def to_s
131
179
  out = []
@@ -4,7 +4,7 @@ module Doing
4
4
  ##
5
5
  ## Log adapter
6
6
  ##
7
- class LogAdapter
7
+ class Logger
8
8
  # Sets the log device
9
9
  attr_writer :logdev
10
10
 
@@ -332,9 +332,15 @@ module Doing
332
332
  if tags_added.empty?
333
333
  count(:skipped, level: :debug, message: 'no tags added to %count %items')
334
334
  elsif single && item
335
+ elapsed = if item && tags_added.include?('done')
336
+ item.interval ? " (#{item.interval&.time_string(format: :dhm)})" : ''
337
+ else
338
+ ''
339
+ end
340
+
335
341
  added = tags_added.log_tags
336
342
  info('Tagged:',
337
- %(added #{tags_added.count == 1 ? 'tag' : 'tags'} #{added} to #{item.title}))
343
+ %(added #{tags_added.count == 1 ? 'tag' : 'tags'} #{added}#{elapsed} to #{item.title}))
338
344
  else
339
345
  count(:added_tags, level: :info, tag: tags_added, message: '%tags added to %count %items')
340
346
  end
@@ -25,7 +25,7 @@ module Doing
25
25
 
26
26
  section = options[:section] || Doing.setting('current_section')
27
27
  options[:no_overlap] ||= false
28
- options[:autotag] ||= wwid.auto_tag
28
+ options[:autotag] ||= Doing.auto_tag
29
29
 
30
30
  wwid.content.add_section(section) unless wwid.content.section?(section)
31
31
 
@@ -29,7 +29,7 @@ module Doing
29
29
  exit_now! 'File not found' unless File.exist?(File.expand_path(path))
30
30
 
31
31
  options[:no_overlap] ||= false
32
- options[:autotag] ||= wwid.auto_tag
32
+ options[:autotag] ||= Doing.auto_tag
33
33
 
34
34
  tags = options[:tag] ? options[:tag].split(/[ ,]+/).map { |t| t.sub(/^@?/, '') } : []
35
35
  prefix = options[:prefix] || ''
@@ -26,7 +26,7 @@ module Doing
26
26
  exit_now! 'Path to JSON report required' if path.nil?
27
27
  section = options[:section] || Doing.setting('current_section')
28
28
  options[:no_overlap] ||= false
29
- options[:autotag] ||= wwid.auto_tag
29
+ options[:autotag] ||= Doing.auto_tag
30
30
  wwid.content.add_section(section) unless wwid.content.section?(section)
31
31
 
32
32
  add_tags = options[:tag] ? options[:tag].split(/[ ,]+/).map { |t| t.sub(/^@?/, '') } : []
@@ -144,7 +144,7 @@ module Doing
144
144
  tags = title.scan(/(?<=\A| )(@(\S+?)(\([^)]+\))?)(?= |\Z)/).uniq
145
145
  tags.each do |tag|
146
146
  found = false
147
- title.gsub!(/( |^)#{tag[1]}(\([^)]+\))?(?= |$)/) do |m|
147
+ title.gsub!(/( |^)#{Regexp.escape(tag[1])}(\([^)]+\))?(?= |$)/) do |m|
148
148
  if found
149
149
  ''
150
150
  else
data/lib/doing/types.rb CHANGED
@@ -11,8 +11,8 @@ module Doing
11
11
  REGEX_TIME = /^#{REGEX_CLOCK}$/i.freeze
12
12
  REGEX_DAY = /^(mon|tue|wed|thur?|fri|sat|sun)(\w+(day)?)?$/i.freeze
13
13
  REGEX_RANGE_INDICATOR = ' +(?:to|through|thru|(?:un)?til|-+) +'
14
- REGEX_RANGE = /^\S+#{REGEX_RANGE_INDICATOR}+\S+/i.freeze
15
- REGEX_TIME_RANGE = /^#{REGEX_CLOCK}#{REGEX_RANGE_INDICATOR}#{REGEX_CLOCK}$/i.freeze
14
+ REGEX_RANGE = /^\S+.*?#{REGEX_RANGE_INDICATOR}\S+.*?$/i.freeze
15
+ REGEX_TIME_RANGE = /^#{REGEX_CLOCK}(?:#{REGEX_RANGE_INDICATOR}#{REGEX_CLOCK})?$/i.freeze
16
16
 
17
17
  InvalidExportType = Class.new(RuntimeError)
18
18
  MissingConfigFile = Class.new(RuntimeError)
data/lib/doing/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '2.1.31pre'
2
+ VERSION = '2.1.35'
3
3
  end