doing 2.1.45 → 2.1.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/.irbrc +3 -0
  3. data/CHANGELOG.md +32 -0
  4. data/Gemfile.lock +1 -1
  5. data/README.md +1 -1
  6. data/bin/commands/completion.rb +1 -1
  7. data/bin/commands/config.rb +1 -1
  8. data/bin/commands/last.rb +1 -1
  9. data/bin/commands/now.rb +2 -1
  10. data/bin/commands/recent.rb +1 -1
  11. data/bin/commands/reset.rb +6 -4
  12. data/docs/doc/Array.html +1 -1
  13. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  14. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  15. data/docs/doc/BooleanTermParser/Query.html +1 -1
  16. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  17. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  18. data/docs/doc/BooleanTermParser.html +1 -1
  19. data/docs/doc/Doing/ArrayCleanup.html +1 -1
  20. data/docs/doc/Doing/ArrayNestedHash.html +1 -1
  21. data/docs/doc/Doing/ArrayTags.html +1 -1
  22. data/docs/doc/Doing/CSVExport.html +1 -1
  23. data/docs/doc/Doing/CalendarImport.html +1 -1
  24. data/docs/doc/Doing/Change.html +1 -1
  25. data/docs/doc/Doing/Changes.html +1 -1
  26. data/docs/doc/Doing/ChronifyArray.html +1 -1
  27. data/docs/doc/Doing/ChronifyNumeric.html +1 -1
  28. data/docs/doc/Doing/ChronifyString.html +1 -1
  29. data/docs/doc/Doing/Color.html +1 -1
  30. data/docs/doc/Doing/Completion/BashCompletions.html +1 -1
  31. data/docs/doc/Doing/Completion/FishCompletions.html +1 -1
  32. data/docs/doc/Doing/Completion/StringUtils.html +1 -1
  33. data/docs/doc/Doing/Completion/ZshCompletions.html +1 -1
  34. data/docs/doc/Doing/Completion.html +5 -5
  35. data/docs/doc/Doing/Configuration.html +1 -1
  36. data/docs/doc/Doing/DayOneRenderer.html +1 -1
  37. data/docs/doc/Doing/DayoneExport.html +1 -1
  38. data/docs/doc/Doing/DoingExport.html +206 -0
  39. data/docs/doc/Doing/DoingImport.html +1 -1
  40. data/docs/doc/Doing/Entry.html +1 -1
  41. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  42. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  43. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  44. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  45. data/docs/doc/Doing/Errors/HistoryLimitError.html +1 -1
  46. data/docs/doc/Doing/Errors/InvalidPlugin.html +1 -1
  47. data/docs/doc/Doing/Errors/MissingBackupFile.html +1 -1
  48. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  49. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  50. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  51. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  52. data/docs/doc/Doing/Errors.html +1 -1
  53. data/docs/doc/Doing/HTMLExport.html +1 -1
  54. data/docs/doc/Doing/Hooks.html +1 -1
  55. data/docs/doc/Doing/Item.html +75 -36
  56. data/docs/doc/Doing/ItemDates.html +1 -1
  57. data/docs/doc/Doing/ItemQuery.html +1 -1
  58. data/docs/doc/Doing/ItemState.html +1 -1
  59. data/docs/doc/Doing/ItemTags.html +1 -1
  60. data/docs/doc/Doing/Items.html +129 -1
  61. data/docs/doc/Doing/JSONExport.html +1 -1
  62. data/docs/doc/Doing/JSONImport.html +295 -0
  63. data/docs/doc/Doing/Logger.html +1 -1
  64. data/docs/doc/Doing/MarkdownExport.html +1 -1
  65. data/docs/doc/Doing/Note.html +1 -1
  66. data/docs/doc/Doing/Pager.html +1 -1
  67. data/docs/doc/Doing/Plugins.html +1 -1
  68. data/docs/doc/Doing/Prompt.html +1 -1
  69. data/docs/doc/Doing/PromptChoose.html +1 -1
  70. data/docs/doc/Doing/PromptFZF.html +1 -1
  71. data/docs/doc/Doing/PromptInput.html +1 -1
  72. data/docs/doc/Doing/PromptSTD.html +1 -1
  73. data/docs/doc/Doing/PromptYN.html +1 -1
  74. data/docs/doc/Doing/Section.html +1 -1
  75. data/docs/doc/Doing/StringHighlight.html +1 -1
  76. data/docs/doc/Doing/StringNormalize.html +1 -1
  77. data/docs/doc/Doing/StringQuery.html +1 -1
  78. data/docs/doc/Doing/StringTags.html +1 -1
  79. data/docs/doc/Doing/StringTransform.html +1 -1
  80. data/docs/doc/Doing/StringTruncate.html +1 -1
  81. data/docs/doc/Doing/StringURL.html +1 -1
  82. data/docs/doc/Doing/SymbolNormalize.html +1 -1
  83. data/docs/doc/Doing/TaskPaperExport.html +1 -1
  84. data/docs/doc/Doing/TemplateExport.html +1 -1
  85. data/docs/doc/Doing/TemplateString.html +2 -2
  86. data/docs/doc/Doing/TimingImport.html +1 -1
  87. data/docs/doc/Doing/Types.html +1 -1
  88. data/docs/doc/Doing/Util/Backup.html +1 -1
  89. data/docs/doc/Doing/Util.html +2 -2
  90. data/docs/doc/Doing/Version.html +1 -1
  91. data/docs/doc/Doing/WWID.html +1 -1
  92. data/docs/doc/Doing.html +4 -4
  93. data/docs/doc/FalseClass.html +1 -1
  94. data/docs/doc/GLI/Commands/Help.html +1 -1
  95. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  96. data/docs/doc/GLI/Commands.html +1 -1
  97. data/docs/doc/GLI.html +1 -1
  98. data/docs/doc/Hash.html +1 -1
  99. data/docs/doc/Numeric.html +1 -1
  100. data/docs/doc/Object.html +1 -1
  101. data/docs/doc/PhraseParser/Operator.html +1 -1
  102. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  103. data/docs/doc/PhraseParser/Query.html +1 -1
  104. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  105. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  106. data/docs/doc/PhraseParser/TermClause.html +1 -1
  107. data/docs/doc/PhraseParser.html +1 -1
  108. data/docs/doc/Status.html +1 -1
  109. data/docs/doc/String.html +64 -2
  110. data/docs/doc/Symbol.html +1 -1
  111. data/docs/doc/Time.html +1 -1
  112. data/docs/doc/TrueClass.html +1 -1
  113. data/docs/doc/_index.html +22 -1
  114. data/docs/doc/class_list.html +1 -1
  115. data/docs/doc/file.README.html +2 -2
  116. data/docs/doc/index.html +2 -2
  117. data/docs/doc/method_list.html +576 -456
  118. data/docs/doc/top-level-namespace.html +1 -1
  119. data/doing.rdoc +20 -20
  120. data/lib/completion/_doing.zsh +31 -31
  121. data/lib/doing/add_options.rb +1 -1
  122. data/lib/doing/completion/fig_completion.rb +121 -0
  123. data/lib/doing/completion.rb +14 -4
  124. data/lib/doing/item/item.rb +7 -8
  125. data/lib/doing/items/items.rb +24 -0
  126. data/lib/doing/plugin_manager.rb +1 -1
  127. data/lib/doing/plugins/export/doing_export.rb +37 -0
  128. data/lib/doing/plugins/export/json_export.rb +16 -2
  129. data/lib/doing/plugins/export/template_export.rb +4 -2
  130. data/lib/doing/plugins/import/doing_import.rb +17 -6
  131. data/lib/doing/plugins/import/json_import.rb +94 -0
  132. data/lib/doing/string/string.rb +9 -0
  133. data/lib/doing/version.rb +1 -1
  134. data/lib/doing/wwid/filetools.rb +3 -2
  135. data/lib/doing/wwid/filter.rb +2 -2
  136. data/lib/doing/wwid/interactive.rb +2 -1
  137. data/lib/doing/wwid/modify.rb +6 -9
  138. data/lib/doing.rb +1 -0
  139. metadata +7 -2
@@ -216,7 +216,7 @@
216
216
  </div>
217
217
 
218
218
  <div id="footer">
219
- Generated on Tue Mar 22 10:06:15 2022 by
219
+ Generated on Wed May 11 10:25:19 2022 by
220
220
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
221
221
  0.9.27 (ruby-3.0.1).
222
222
  </div>
data/doing.rdoc CHANGED
@@ -5,7 +5,7 @@ record of what you've been doing, complete with tag-based time tracking. The
5
5
  command line tool allows you to add entries, annotate with tags and notes, and
6
6
  view your entries with myriad options, with a focus on a "natural" language syntax.
7
7
 
8
- v2.1.45
8
+ v2.1.48
9
9
 
10
10
  === Global Options
11
11
  === --config_file arg
@@ -98,7 +98,7 @@ Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]
98
98
 
99
99
  ===== --bool BOOLEAN
100
100
 
101
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
101
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
102
102
 
103
103
  [Default Value] pattern
104
104
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -211,7 +211,7 @@ Archive entries older than date (natural language).
211
211
 
212
212
  ===== --bool BOOLEAN
213
213
 
214
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
214
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
215
215
 
216
216
  [Default Value] pattern
217
217
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -354,7 +354,7 @@ Adds @done tag without datestamp so no elapsed time is recorded.
354
354
  ===== Options
355
355
  ===== --bool BOOLEAN
356
356
 
357
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
357
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
358
358
 
359
359
  [Default Value] pattern
360
360
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -524,7 +524,7 @@ so typing 'doing' and hitting tab will offer completions of subcommands and thei
524
524
  Deprecated, specify shell as argument to subcommand
525
525
 
526
526
  [Default Value] None
527
- [Must Match] (?i-mx:^(?:[bzf](?:[ai]?sh)?|all)$)
527
+ [Must Match] (?i-mx:^(?:[bzf](?:[ai]?sh)?|fig|all)$)
528
528
 
529
529
 
530
530
  ===== Commands
@@ -574,7 +574,7 @@ DEPRECATED
574
574
 
575
575
 
576
576
  ===== Commands
577
- ====== Command: <tt>edit </tt>
577
+ ====== Command: <tt>edit|open </tt>
578
578
  Open config file in editor
579
579
 
580
580
 
@@ -758,7 +758,7 @@ Backdate completed date to date string [4pm|20m|2h|yesterday noon]
758
758
 
759
759
  ===== --bool BOOLEAN
760
760
 
761
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
761
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
762
762
 
763
763
  [Default Value] pattern
764
764
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -893,7 +893,7 @@ Search entries older than date (natural language). If this is only a time (8am,
893
893
 
894
894
  ===== --bool BOOLEAN
895
895
 
896
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
896
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
897
897
 
898
898
  [Default Value] pattern
899
899
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -1055,7 +1055,7 @@ List commands one per line, to assist with shell completion
1055
1055
  ==== Command: <tt>import PATH</tt>
1056
1056
  Import entries from an external source
1057
1057
 
1058
- Imports entries from other sources. Available plugins: calendar, capturething, doing, timing
1058
+ Imports entries from other sources. Available plugins: calendar, capturething, doing, json, timing
1059
1059
  ===== Options
1060
1060
  ===== --after DATE_STRING
1061
1061
 
@@ -1123,7 +1123,7 @@ Tag all imported entries
1123
1123
 
1124
1124
  ===== --type TYPE
1125
1125
 
1126
- Import type (calendar|capturething|doing|timing)
1126
+ Import type (calendar|capturething|doing|json|timing)
1127
1127
 
1128
1128
  [Default Value] doing
1129
1129
 
@@ -1161,7 +1161,7 @@ allowing `doing last` to target historical entries.
1161
1161
  ===== Options
1162
1162
  ===== --bool BOOLEAN
1163
1163
 
1164
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
1164
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
1165
1165
 
1166
1166
  [Default Value] pattern
1167
1167
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -1278,7 +1278,7 @@ Mark last entry as flagged
1278
1278
  ===== Options
1279
1279
  ===== --bool BOOLEAN
1280
1280
 
1281
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
1281
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
1282
1282
 
1283
1283
  [Default Value] pattern
1284
1284
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -1426,7 +1426,7 @@ If -r is provided with no other arguments, the last note is removed.
1426
1426
  ===== Options
1427
1427
  ===== --bool BOOLEAN
1428
1428
 
1429
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
1429
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
1430
1430
 
1431
1431
  [Default Value] pattern
1432
1432
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -1584,7 +1584,7 @@ View entries before specified time (e.g. 8am, 12:30pm, 15:00)
1584
1584
 
1585
1585
  ===== --bool BOOLEAN
1586
1586
 
1587
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
1587
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
1588
1588
 
1589
1589
  [Default Value] pattern
1590
1590
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -1881,7 +1881,7 @@ If a date string is provided as an argument, the start time will be set to the p
1881
1881
  ===== Options
1882
1882
  ===== --bool BOOLEAN
1883
1883
 
1884
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
1884
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
1885
1885
 
1886
1886
  [Default Value] pattern
1887
1887
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -1984,7 +1984,7 @@ Rotate entries older than date
1984
1984
 
1985
1985
  ===== --bool BOOLEAN
1986
1986
 
1987
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
1987
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
1988
1988
 
1989
1989
  [Default Value] pattern
1990
1990
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -2286,7 +2286,7 @@ Show entries older than date (natural language). If this is only a time (8am, 1:
2286
2286
 
2287
2287
  ===== --bool BOOLEAN
2288
2288
 
2289
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
2289
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
2290
2290
 
2291
2291
  [Default Value] pattern
2292
2292
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -2460,7 +2460,7 @@ and "2d" would be interpreted as "two days ago."
2460
2460
  ===== Options
2461
2461
  ===== --bool BOOLEAN
2462
2462
 
2463
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
2463
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
2464
2464
 
2465
2465
  [Default Value] pattern
2466
2466
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -2605,7 +2605,7 @@ Add (or remove) tags from the last entry, or from multiple entries
2605
2605
  ===== Options
2606
2606
  ===== --bool BOOLEAN
2607
2607
 
2608
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
2608
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
2609
2609
 
2610
2610
  [Default Value] pattern
2611
2611
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -2746,7 +2746,7 @@ List all tags in the current Doing file
2746
2746
  ===== Options
2747
2747
  ===== --bool BOOLEAN
2748
2748
 
2749
- Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
2749
+ Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
2750
2750
 
2751
2751
  [Default Value] pattern
2752
2752
  [Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
@@ -66,22 +66,22 @@ function _doing() {
66
66
 
67
67
  case $line[1] in
68
68
  again)
69
- args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string (4pm|20m|2h|yesterday noon)]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item to resume from a menu of matching entries]" "--in[Add new entry to section]:SECTION_NAME:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" "--not[Repeat items that *dont* match search/tag filterst* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Get last entry from a specific section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
69
+ args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item to resume from a menu of matching entries]" "--in[Add new entry to section]:SECTION_NAME:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" "--not[Repeat items that *don't* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Get last entry from a specific section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
70
70
  ;;
71
71
  resume)
72
- args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string (4pm|20m|2h|yesterday noon)]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item to resume from a menu of matching entries]" "--in[Add new entry to section]:SECTION_NAME:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" "--not[Repeat items that *dont* match search/tag filterst* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Get last entry from a specific section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
72
+ args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item to resume from a menu of matching entries]" "--in[Add new entry to section]:SECTION_NAME:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" "--not[Repeat items that *don't* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Get last entry from a specific section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
73
73
  ;;
74
74
  archive)
75
- args=( "--after[Archive entries newer than date]:DATE_STRING:" "--before[Archive entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep]:X:" "--label[Label moved items with @from(SECTION_NAME)]" "--not[Archive items that *dont* match search/tag filterst* match search/tag filters]" "--search[Filter entries using a search query]:QUERY:" {'(--to)-t','(-t)--to'}"[Move entries to]:SECTION_NAME:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
75
+ args=( "--after[Archive entries newer than date]:DATE_STRING:" "--before[Archive entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep]:X:" "--label[Label moved items with @from(SECTION_NAME)]" "--not[Archive items that *don't* match search/tag filters]" "--search[Filter entries using a search query]:QUERY:" {'(--to)-t','(-t)--to'}"[Move entries to]:SECTION_NAME:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
76
76
  ;;
77
77
  move)
78
- args=( "--after[Archive entries newer than date]:DATE_STRING:" "--before[Archive entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep]:X:" "--label[Label moved items with @from(SECTION_NAME)]" "--not[Archive items that *dont* match search/tag filterst* match search/tag filters]" "--search[Filter entries using a search query]:QUERY:" {'(--to)-t','(-t)--to'}"[Move entries to]:SECTION_NAME:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
78
+ args=( "--after[Archive entries newer than date]:DATE_STRING:" "--before[Archive entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep]:X:" "--label[Label moved items with @from(SECTION_NAME)]" "--not[Archive items that *don't* match search/tag filters]" "--search[Filter entries using a search query]:QUERY:" {'(--to)-t','(-t)--to'}"[Move entries to]:SECTION_NAME:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
79
79
  ;;
80
80
  autotag)
81
- args=( "--bool[Boolean]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to autotag]:COUNT:" "--force[Dont ask permission to autotag all entries when count is 0t ask permission to autotag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to tag from a menu of matching entries]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Autotag entries matching search filter]:QUERY:" "--tag[Autotag the last X entries containing TAG]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Autotag last entry]" )
81
+ args=( "--bool[Boolean]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to autotag]:COUNT:" "--force[Don't ask permission to autotag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to tag from a menu of matching entries]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Autotag entries matching search filter]:QUERY:" "--tag[Autotag the last X entries containing TAG]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Autotag last entry]" )
82
82
  ;;
83
83
  cancel)
84
- args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to cancel from a menu of matching entries]" "--not[Cancel items that *dont* match search/tag filterst* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Cancel last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
84
+ args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to cancel from a menu of matching entries]" "--not[Cancel items that *don't* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Cancel last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
85
85
  ;;
86
86
  changes)
87
87
  args=( {'(--changes)-C','(-C)--changes'}"[Only output changes]" {'(--all)-a','(-a)--all'}"[Display all versions]" {'(--interactive)-i','(-i)--interactive'}"[Open changelog in interactive viewer]" {'(--lookup)-l','(-l)--lookup'}"[Look up a specific version]:VERSION:" "--markdown[Output raw Markdown]" "--only[Only show changes of type(s)]:TYPES:" {'(--prefix)-p','(-p)--prefix'}"[Include]" "--render[Force rendered output]" {'(--search)-s','(-s)--search'}"[Show changelogs matching search terms]:arg:" "--sort[Sort order]:ORDER:" )
@@ -102,49 +102,49 @@ function _doing() {
102
102
  args=( {'(--dump)-d','(-d)--dump'}"[DEPRECATED]" {'(--update)-u','(-u)--update'}"[DEPRECATED]" )
103
103
  ;;
104
104
  done)
105
- args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Immediately archive the entry]" "--ask[Prompt for note via multi-line input]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--started[Backdate start date for new entry to date string (4pm|20m|2h|yesterday noon)]:DATE_STRING:" "--date[Include date]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" "--from[Start and end times as a date/time range `doing done --from "1am to 8am"`]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--for[Set completion date to start date plus interval]:INTERVAL:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry not already marked @done]" )
105
+ args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Immediately archive the entry]" "--ask[Prompt for note via multi-line input]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--date[Include date]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--for[Set completion date to start date plus interval]:INTERVAL:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry not already marked @done]" )
106
106
  ;;
107
107
  did)
108
- args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Immediately archive the entry]" "--ask[Prompt for note via multi-line input]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--started[Backdate start date for new entry to date string (4pm|20m|2h|yesterday noon)]:DATE_STRING:" "--date[Include date]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" "--from[Start and end times as a date/time range `doing done --from "1am to 8am"`]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--for[Set completion date to start date plus interval]:INTERVAL:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry not already marked @done]" )
108
+ args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Immediately archive the entry]" "--ask[Prompt for note via multi-line input]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--date[Include date]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--for[Set completion date to start date plus interval]:INTERVAL:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry not already marked @done]" )
109
109
  ;;
110
110
  finish)
111
- args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--auto[Auto-generate finish dates from next entrys start times start time]" "--started[Backdate completed date to date string (4pm|20m|2h|yesterday noon)]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--date[Include date]" "--from[Start and end times as a date/time range `doing done --from "1am to 8am"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to finish from a menu of matching entries]" "--not[Finish items that *dont* match search/tag filterst* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry]" "--update[Overwrite existing @done tag with new date]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
111
+ args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--auto[Auto-generate finish dates from next entry's start time]" "--started[Backdate completed date to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--date[Include date]" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to finish from a menu of matching entries]" "--not[Finish items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry]" "--update[Overwrite existing @done tag with new date]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
112
112
  ;;
113
113
  grep)
114
- args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" {'(--delete)-d','(-d)--delete'}"[Delete matching entries]" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Display an interactive menu of results to perform further operations]" "--not[Search items that *dont* match search/tag filterst* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact string matching]" )
114
+ args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" {'(--delete)-d','(-d)--delete'}"[Delete matching entries]" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Display an interactive menu of results to perform further operations]" "--not[Search items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact string matching]" )
115
115
  ;;
116
116
  search)
117
- args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" {'(--delete)-d','(-d)--delete'}"[Delete matching entries]" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Display an interactive menu of results to perform further operations]" "--not[Search items that *dont* match search/tag filterst* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact string matching]" )
117
+ args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" {'(--delete)-d','(-d)--delete'}"[Delete matching entries]" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Display an interactive menu of results to perform further operations]" "--not[Search items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact string matching]" )
118
118
  ;;
119
119
  help)
120
120
  args=( )
121
121
  ;;
122
122
  import)
123
- args=( "--after[Import entries newer than date]:DATE_STRING:" "--autotag[Autotag entries]" "--before[Import entries older than date]:DATE_STRING:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" "--not[Import items that *dont* match search/tag/date filterst* match search/tag/date filters]" "--only_timed[Only import items with recorded time intervals]" "--overlap[Allow entries that overlap existing times]" "--prefix[Prefix entries with]:PREFIX:" {'(--section)-s','(-s)--section'}"[Target section]:NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--tag)-t','(-t)--tag'}"[Tag all imported entries]:TAGS:" "--type[Import type]:TYPE:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
123
+ args=( "--after[Import entries newer than date]:DATE_STRING:" "--autotag[Autotag entries]" "--before[Import entries older than date]:DATE_STRING:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" "--not[Import items that *don't* match search/tag/date filters]" "--only_timed[Only import items with recorded time intervals]" "--overlap[Allow entries that overlap existing times]" "--prefix[Prefix entries with]:PREFIX:" {'(--section)-s','(-s)--section'}"[Target section]:NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--tag)-t','(-t)--tag'}"[Tag all imported entries]:TAGS:" "--type[Import type]:TYPE:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
124
124
  ;;
125
125
  last)
126
- args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" {'(--delete)-d','(-d)--delete'}"[Delete the last entry]" "--duration[Show elapsed time if entry is not tagged @done]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" "--not[Show items that *dont* match search/tag filterst* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
126
+ args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" {'(--delete)-d','(-d)--delete'}"[Delete the last entry]" "--duration[Show elapsed time if entry is not tagged @done]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
127
127
  ;;
128
128
  mark)
129
- args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to tag]:COUNT:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--date)-d','(-d)--date'}"[Include current date/time with tag]" "--force[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to flag from a menu of matching entries]" "--not[Flag items that *dont* match search/tag filterst* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove flag]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Flag last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
129
+ args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to tag]:COUNT:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--date)-d','(-d)--date'}"[Include current date/time with tag]" "--force[Don't ask permission to flag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to flag from a menu of matching entries]" "--not[Flag items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove flag]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Flag last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
130
130
  ;;
131
131
  flag)
132
- args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to tag]:COUNT:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--date)-d','(-d)--date'}"[Include current date/time with tag]" "--force[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to flag from a menu of matching entries]" "--not[Flag items that *dont* match search/tag filterst* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove flag]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Flag last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
132
+ args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to tag]:COUNT:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--date)-d','(-d)--date'}"[Include current date/time with tag]" "--force[Don't ask permission to flag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to flag from a menu of matching entries]" "--not[Flag items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove flag]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Flag last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
133
133
  ;;
134
134
  meanwhile)
135
- args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Archive previous @meanwhile entry]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string (4pm|20m|2h|yesterday noon)]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
135
+ args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Archive previous @meanwhile entry]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
136
136
  ;;
137
137
  note)
138
- args=( "--ask[Prompt for note via multi-line input]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item for new note from a menu of matching entries]" "--not[Note items that *dont* match search/tag filterst* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Replace/Remove last entrys notes note]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
138
+ args=( "--ask[Prompt for note via multi-line input]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item for new note from a menu of matching entries]" "--not[Note items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Replace/Remove last entry's note]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
139
139
  ;;
140
140
  now)
141
- args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string (4pm|20m|2h|yesterday noon)]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--finish_last)-f','(-f)--finish_last'}"[Timed entry]" "--from[Set a start and optionally end time as a date range]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
141
+ args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--finish_last)-f','(-f)--finish_last'}"[Timed entry]" "--from[Set a start and optionally end time as a date range]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
142
142
  ;;
143
143
  next)
144
- args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string (4pm|20m|2h|yesterday noon)]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--finish_last)-f','(-f)--finish_last'}"[Timed entry]" "--from[Set a start and optionally end time as a date range]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
144
+ args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--finish_last)-f','(-f)--finish_last'}"[Timed entry]" "--from[Set a start and optionally end time as a date range]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
145
145
  ;;
146
146
  on)
147
- args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing on --from "12pm to 4pm"`]:TIME_RANGE:" "--not[Show items that *dont* match search/tag filterst* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
147
+ args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing on --from \"12pm to 4pm\"`]:TIME_RANGE:" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
148
148
  ;;
149
149
  open)
150
150
  args=( {'(--app)-a','(-a)--app'}"[Open with app name]:APP_NAME:" {'(--bundle_id)-b','(-b)--bundle_id'}"[Open with app bundle id]:BUNDLE_ID:" {'(--editor)-e','(-e)--editor'}"[Open with editor command]:COMMAND:" )
@@ -159,34 +159,34 @@ function _doing() {
159
159
  args=( {'(--file)-f','(-f)--file'}"[Specify alternate doing file]:PATH:" {'(--interactive)-i','(-i)--interactive'}"[Select from an interactive menu]" )
160
160
  ;;
161
161
  reset)
162
- args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--from[Start and end times as a date/time range `doing done --from "1am to 8am"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries]" "--not[Reset items that *dont* match search/tag filterst* match search/tag filters]" {'(--resume)-r','(-r)--resume'}"[Resume entry]" {'(--section)-s','(-s)--section'}"[Limit search to section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
162
+ args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries]" "--not[Reset items that *don't* match search/tag filters]" {'(--resume)-r','(-r)--resume'}"[Resume entry]" {'(--section)-s','(-s)--section'}"[Limit search to section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
163
163
  ;;
164
164
  begin)
165
- args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--from[Start and end times as a date/time range `doing done --from "1am to 8am"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries]" "--not[Reset items that *dont* match search/tag filterst* match search/tag filters]" {'(--resume)-r','(-r)--resume'}"[Resume entry]" {'(--section)-s','(-s)--section'}"[Limit search to section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
165
+ args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries]" "--not[Reset items that *don't* match search/tag filters]" {'(--resume)-r','(-r)--resume'}"[Resume entry]" {'(--section)-s','(-s)--section'}"[Limit search to section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
166
166
  ;;
167
167
  rotate)
168
- args=( "--before[Rotate entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep in each section]:X:" "--not[Rotate items that *dont* match search/tag filterst* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Section to rotate]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
168
+ args=( "--before[Rotate entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep in each section]:X:" "--not[Rotate items that *don't* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Section to rotate]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
169
169
  ;;
170
170
  sections)
171
171
  args=( )
172
172
  ;;
173
173
  select)
174
- args=( {'(--archive)-a','(-a)--archive'}"[Archive selected items]" "--after[Select entries newer than date]:DATE_STRING:" "--resume[Copy selection as a new entry with current time and no @done tag]" "--before[Select entries older than date]:DATE_STRING:" {'(--cancel)-c','(-c)--cancel'}"[Cancel selected items]" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--delete)-d','(-d)--delete'}"[Delete selected items]" {'(--editor)-e','(-e)--editor'}"[Edit selected item(s)]" {'(--finish)-f','(-f)--finish'}"[Add @done with current time to selected item(s)]" "--flag[Add flag to selected item(s)]" "--force[Perform action without confirmation]" "--from[Date range]:DATE_OR_RANGE:" {'(--move)-m','(-m)--move'}"[Move selected items to section]:SECTION:" "--menu[Use --no-menu to skip the interactive menu]" "--not[Select items that *dont* match search/tag filterst* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output entries to format]:FORMAT:" {'(--query)-q','(-q)--query'}"[Initial search query for filtering]:QUERY:" {'(--remove)-r','(-r)--remove'}"[Reverse -c]" {'(--section)-s','(-s)--section'}"[Select from a specific section]:SECTION:" "--save_to[Save selected entries to file using --output format]:FILE:" "--search[Filter entries using a search query]:QUERY:" {'(--tag)-t','(-t)--tag'}"[Tag selected entries]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
174
+ args=( {'(--archive)-a','(-a)--archive'}"[Archive selected items]" "--after[Select entries newer than date]:DATE_STRING:" "--resume[Copy selection as a new entry with current time and no @done tag]" "--before[Select entries older than date]:DATE_STRING:" {'(--cancel)-c','(-c)--cancel'}"[Cancel selected items]" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--delete)-d','(-d)--delete'}"[Delete selected items]" {'(--editor)-e','(-e)--editor'}"[Edit selected item(s)]" {'(--finish)-f','(-f)--finish'}"[Add @done with current time to selected item(s)]" "--flag[Add flag to selected item(s)]" "--force[Perform action without confirmation]" "--from[Date range]:DATE_OR_RANGE:" {'(--move)-m','(-m)--move'}"[Move selected items to section]:SECTION:" "--menu[Use --no-menu to skip the interactive menu]" "--not[Select items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output entries to format]:FORMAT:" {'(--query)-q','(-q)--query'}"[Initial search query for filtering]:QUERY:" {'(--remove)-r','(-r)--remove'}"[Reverse -c]" {'(--section)-s','(-s)--section'}"[Select from a specific section]:SECTION:" "--save_to[Save selected entries to file using --output format]:FILE:" "--search[Filter entries using a search query]:QUERY:" {'(--tag)-t','(-t)--tag'}"[Tag selected entries]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
175
175
  ;;
176
176
  show)
177
- args=( {'(--age)-a','(-a)--age'}"[Age]:AGE:" "--after[Show entries newer than date]:DATE_STRING:" "--before[Show entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[Max count to show]:MAX:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries to perform additional operations]" {'(--menu)-m','(-m)--menu'}"[Select section or tag to display from a menu]" "--not[Show items that *dont* match search/tag filterst* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--sort)-s','(-s)--sort'}"[Sort order]:ORDER:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
177
+ args=( {'(--age)-a','(-a)--age'}"[Age]:AGE:" "--after[Show entries newer than date]:DATE_STRING:" "--before[Show entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[Max count to show]:MAX:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries to perform additional operations]" {'(--menu)-m','(-m)--menu'}"[Select section or tag to display from a menu]" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--sort)-s','(-s)--sort'}"[Sort order]:ORDER:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
178
178
  ;;
179
179
  since)
180
- args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--not[Since items that *dont* match search/tag filterst* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
180
+ args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--not[Since items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
181
181
  ;;
182
182
  tag)
183
- args=( {'(--autotag)-a','(-a)--autotag'}"[Autotag entries based on autotag configuration in ~/]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to tag]:COUNT:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--date)-d','(-d)--date'}"[Include current date/time with tag]" "--force[Dont ask permission to tag all entries when count is 0t ask permission to tag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to tag from a menu of matching entries]" "--not[Tag items that *dont* match search/tag filterst* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove given tag(s)]" "--regex[Interpret tag string as regular expression]" "--rename[Replace existing tag with tag argument]:ORIG_TAG:" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Tag last entry]" {'(--value)-v','(-v)--value'}"[Include a value]:VALUE:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
183
+ args=( {'(--autotag)-a','(-a)--autotag'}"[Autotag entries based on autotag configuration in ~/]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to tag]:COUNT:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--date)-d','(-d)--date'}"[Include current date/time with tag]" "--force[Don't ask permission to tag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to tag from a menu of matching entries]" "--not[Tag items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove given tag(s)]" "--regex[Interpret tag string as regular expression]" "--rename[Replace existing tag with tag argument]:ORIG_TAG:" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Tag last entry]" {'(--value)-v','(-v)--value'}"[Include a value]:VALUE:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
184
184
  ;;
185
185
  tag_dir)
186
186
  args=( "--clear[Remove all default_tags from the local]" {'(--editor)-e','(-e)--editor'}"[Use default editor to edit tag list]" {'(--remove)-r','(-r)--remove'}"[Delete tag(s) from the current list]" )
187
187
  ;;
188
188
  tags)
189
- args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--counts)-c','(-c)--counts'}"[Show count of occurrences]" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--interactive)-i','(-i)--interactive'}"[Select items to scan from a menu of matching entries]" {'(--line)-l','(-l)--line'}"[Output in a single line with @ symbols]" "--not[Show items that *dont* match search/tag filterst* match search/tag filters]" {'(--order)-o','(-o)--order'}"[Sort order]:ORDER:" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--sort[Sort by name or count]:SORT_ORDER:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
189
+ args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--counts)-c','(-c)--counts'}"[Show count of occurrences]" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--interactive)-i','(-i)--interactive'}"[Select items to scan from a menu of matching entries]" {'(--line)-l','(-l)--line'}"[Output in a single line with @ symbols]" "--not[Show items that *don't* match search/tag filters]" {'(--order)-o','(-o)--order'}"[Sort order]:ORDER:" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--sort[Sort by name or count]:SORT_ORDER:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
190
190
  ;;
191
191
  template)
192
192
  args=( {'(--column)-c','(-c)--column'}"[List in single column for completion]" {'(--list)-l','(-l)--list'}"[List all available templates]" {'(--path)-p','(-p)--path'}"[Save template to alternate location]:DIRECTORY:" {'(--save)-s','(-s)--save'}"[Save template to file instead of STDOUT]" )
@@ -195,13 +195,13 @@ function _doing() {
195
195
  args=( )
196
196
  ;;
197
197
  today)
198
- args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing today --from "12pm to 4pm"`]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" )
198
+ args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing today --from \"12pm to 4pm\"`]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" )
199
199
  ;;
200
200
  undo)
201
201
  args=( {'(--file)-f','(-f)--file'}"[Specify alternate doing file]:PATH:" {'(--interactive)-i','(-i)--interactive'}"[Select from recent backups]" {'(--prune)-p','(-p)--prune'}"[Remove old backups]:COUNT:" {'(--redo)-r','(-r)--redo'}"[Redo last undo]" )
202
202
  ;;
203
203
  view)
204
- args=( "--after[Show entries newer than date]:DATE_STRING:" "--age[Age]:AGE:" "--before[Show entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[Count to display]:COUNT:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" "--color[Include colors in output]" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries to perform additional operations]" "--not[Show items that *dont* match search/tag filterst* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--totals[Show intervals with totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
204
+ args=( "--after[Show entries newer than date]:DATE_STRING:" "--age[Age]:AGE:" "--before[Show entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[Count to display]:COUNT:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--color[Include colors in output]" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries to perform additional operations]" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--totals[Show intervals with totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
205
205
  ;;
206
206
  views)
207
207
  args=( {'(--column)-c','(-c)--column'}"[List in single column]" {'(--editor)-e','(-e)--editor'}"[Open YAML for view in editor]" {'(--output)-o','(-o)--output'}"[Output/edit view in alternative format]:FORMAT:" {'(--remove)-r','(-r)--remove'}"[Delete view config]" )
@@ -210,7 +210,7 @@ function _doing() {
210
210
  args=( "--after[Include entries newer than date]:DATE_STRING:" {'(--bool)-b','(-b)--bool'}"[Tag boolean]:BOOLEAN:" "--before[Include entries older than date]:DATE_STRING:" {'(--from)-f','(-f)--from'}"[Date range to include]:DATE_OR_RANGE:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section to rotate]:SECTION_NAME:" "--search[Search filter]:QUERY:" "--tag[Tag filter]:TAG:" )
211
211
  ;;
212
212
  yesterday)
213
- args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing yesterday --from "12pm to 4pm"`]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" )
213
+ args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing yesterday --from \"12pm to 4pm\"`]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--totals[Show time totals at the end of output]" )
214
214
  ;;
215
215
  esac
216
216
 
@@ -147,7 +147,7 @@ def add_options(type, cmd, default_template: 'default')
147
147
  cmd.desc "#{action} items that *don't* match search/tag filters"
148
148
  cmd.switch [:not], default_value: false, negatable: false
149
149
 
150
- cmd.desc 'Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans'
150
+ cmd.desc 'Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans'
151
151
  cmd.arg_name 'BOOLEAN'
152
152
  cmd.flag [:bool], must_match: REGEX_BOOL,
153
153
  default_value: :pattern,
@@ -0,0 +1,121 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Doing
4
+ module Completion
5
+ class ::String
6
+ def sanitize
7
+ gsub(/"/, '\"')
8
+ end
9
+ end
10
+
11
+ # Generate completions for zsh
12
+ class FigCompletions
13
+ attr_accessor :commands, :global_options
14
+
15
+ def generate_helpers
16
+ out=<<~EOFUNCTIONS
17
+ const completionSpec: Fig.Spec = {
18
+ name: "doing",
19
+ description: "A CLI for a What Was I Doing system",
20
+ subcommands: [
21
+ #{generate_subcommand_completions.join("\n ")}
22
+ ],
23
+ };
24
+ export default completionSpec;
25
+ EOFUNCTIONS
26
+ @bar.advance(status: '✅')
27
+ @bar.finish
28
+ out
29
+ end
30
+
31
+ def generate_subcommand_completions
32
+ out = []
33
+ indent = ' '
34
+ @commands.each do |cmd|
35
+ cmd[:commands].each do |c|
36
+ out << <<~EOCOMMAND
37
+ {
38
+ #{indent}name: "#{c}",
39
+ #{indent}description: "#{cmd[:description].sanitize}",
40
+ #{indent}#{generate_subcommand_option_completions(cmd)}
41
+ },
42
+ EOCOMMAND
43
+ end
44
+ end
45
+
46
+ out
47
+ end
48
+
49
+ def generate_subcommand_option_completions(cmd, indent: ' ')
50
+ out = []
51
+
52
+ @bar.advance(status: cmd[:commands].first)
53
+
54
+ data = Completion.get_help_sections(cmd[:commands].first)
55
+
56
+ option_arr = []
57
+
58
+ if data[:command_options]
59
+ Completion.parse_options(data[:command_options]).each do |option|
60
+ next if option.nil?
61
+
62
+ arg = ''
63
+
64
+ if option[:arg]
65
+ arg =<<~EOARG
66
+ args: {
67
+ #{indent} name: "#{option[:arg]}",
68
+ #{indent} description: "#{option[:arg]}",
69
+ #{indent} },
70
+ EOARG
71
+ end
72
+
73
+ if option[:short]
74
+ opt_data =<<~EOOPT
75
+ {
76
+ #{indent} name: ["-#{option[:short]}", "--#{option[:long]}"],
77
+ #{indent} description: "#{option[:description].sanitize}",
78
+ #{indent} #{arg}
79
+ #{indent}},
80
+ EOOPT
81
+ else
82
+ opt_data = <<~EOOPT
83
+ {
84
+ #{indent} name: ["--#{option[:long]}"],
85
+ #{indent} description: "#{option[:description].sanitize}",
86
+ #{indent} #{arg}
87
+ #{indent}},
88
+ EOOPT
89
+ end
90
+
91
+ option_arr << opt_data
92
+
93
+ end
94
+
95
+ cmd_opts = <<~EOCMD
96
+ options: [
97
+ #{indent}#{option_arr.join("\n#{indent}")}
98
+ ],
99
+ EOCMD
100
+ out << cmd_opts
101
+ end
102
+
103
+ out.join("\n")
104
+ end
105
+
106
+ def initialize
107
+ data = Completion.get_help_sections
108
+ @global_options = Completion.parse_options(data[:global_options])
109
+ @commands = Completion.parse_commands(data[:commands])
110
+ @bar = TTY::ProgressBar.new(" \033[0;0;33mGenerating Fig completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :square, hide_cursor: true, status: 'processing subcommands')
111
+ width = TTY::Screen.columns - 45
112
+ @bar.resize(width)
113
+ end
114
+
115
+ def generate_completions
116
+ @bar.start
117
+ generate_helpers
118
+ end
119
+ end
120
+ end
121
+ end