doing 2.1.12 → 2.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +8 -8
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +11 -0
  6. data/Gemfile.lock +1 -1
  7. data/README.md +1 -1
  8. data/bin/doing +120 -45
  9. data/docs/doc/Array.html +1 -1
  10. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  11. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  12. data/docs/doc/BooleanTermParser/Query.html +1 -1
  13. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  14. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  15. data/docs/doc/BooleanTermParser.html +1 -1
  16. data/docs/doc/Doing/Color.html +1 -1
  17. data/docs/doc/Doing/Completion.html +1 -1
  18. data/docs/doc/Doing/Configuration.html +3 -3
  19. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  20. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  21. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  22. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  23. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  24. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  25. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  26. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  27. data/docs/doc/Doing/Errors.html +1 -1
  28. data/docs/doc/Doing/Hooks.html +1 -1
  29. data/docs/doc/Doing/Item.html +116 -1
  30. data/docs/doc/Doing/Items.html +65 -1
  31. data/docs/doc/Doing/LogAdapter.html +1 -1
  32. data/docs/doc/Doing/Note.html +1 -1
  33. data/docs/doc/Doing/Pager.html +1 -1
  34. data/docs/doc/Doing/Plugins.html +1 -1
  35. data/docs/doc/Doing/Prompt.html +1 -1
  36. data/docs/doc/Doing/Section.html +1 -1
  37. data/docs/doc/Doing/TemplateString.html +1 -1
  38. data/docs/doc/Doing/Util/Backup.html +84 -1
  39. data/docs/doc/Doing/Util.html +1 -1
  40. data/docs/doc/Doing/WWID.html +174 -1
  41. data/docs/doc/Doing.html +2 -2
  42. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  43. data/docs/doc/GLI/Commands.html +1 -1
  44. data/docs/doc/GLI.html +1 -1
  45. data/docs/doc/Hash.html +1 -1
  46. data/docs/doc/PhraseParser/Operator.html +1 -1
  47. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  48. data/docs/doc/PhraseParser/Query.html +1 -1
  49. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  50. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  51. data/docs/doc/PhraseParser/TermClause.html +1 -1
  52. data/docs/doc/PhraseParser.html +1 -1
  53. data/docs/doc/Status.html +1 -1
  54. data/docs/doc/String.html +1 -1
  55. data/docs/doc/Symbol.html +1 -1
  56. data/docs/doc/Time.html +1 -1
  57. data/docs/doc/_index.html +1 -1
  58. data/docs/doc/file.README.html +2 -2
  59. data/docs/doc/index.html +2 -2
  60. data/docs/doc/method_list.html +253 -197
  61. data/docs/doc/top-level-namespace.html +1 -1
  62. data/doing.rdoc +202 -40
  63. data/lib/completion/_doing.zsh +24 -20
  64. data/lib/completion/doing.bash +41 -30
  65. data/lib/completion/doing.fish +23 -1
  66. data/lib/doing/item.rb +119 -0
  67. data/lib/doing/version.rb +1 -1
  68. data/lib/doing/wwid.rb +20 -5
  69. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f9b0909f6932a364f723a8f58d8f2c0c77dc8d1d3c94e8821aa547bf86782d3
4
- data.tar.gz: 648866be90f3bf9fab15917030816cbd69487b118adc52359e4bdac25c20fee3
3
+ metadata.gz: c12d0846431cd0468f217f3e1e9b80bcb9a86038fbee7ff057c1db8ad6c56bb3
4
+ data.tar.gz: a144f25b2798825ad042d690e21c1a798b83e06e49480c92be7acea752d37e48
5
5
  SHA512:
6
- metadata.gz: 0af6520dd4912f0add0bc72c3b9b95d41515abac898a9f42c5f61bccef1634d462746b727b1498455dbe360435a6d63492cd9b83ca7654268ad76fda22bed73e
7
- data.tar.gz: 7b831fa4e1b95ec65841bb1e6358b3bf1daef6208f185bc1d9b819d375365725eb76bba258f999927664bbfe77615718408a8d09ca9190de1f825055f518ca8a
6
+ metadata.gz: 66f76cd0588f4dca848c94313051bcb39bc776c4679b8bd9a648887dd764dcc3232d45e18bb260edb7500e3c398aef8a02216a11ce5a593b8822f89267c92214
7
+ data.tar.gz: bc852708998d6e670fe72c882f2e254f64bbec487cd56b659e75220bdd5a5c75b5495d1a9b4a734d56825a00563b1b3052bdcd2c4a93761479a2bbe9a2eb397d
data/.yardoc/checksums CHANGED
@@ -1,25 +1,25 @@
1
1
  lib/doing/hash.rb c2960de9603dcf90be85ce423d9430de27f4f893
2
- lib/doing/item.rb fcf106fb43a1a979d5213c8ac47161d9f6d8635f
2
+ lib/doing/item.rb 54cea2275eaa19a9285e358c51f8630a558730ee
3
3
  lib/doing/note.rb bbadd9e34e6dc43a2af1110a5107f46c39d2547f
4
4
  lib/doing/time.rb 4411af636082d3abf6f6402a7d6c9038d96a9ead
5
5
  lib/doing/util.rb 33ad79455893213a0f2993edec0e158526657f09
6
- lib/doing/wwid.rb bca76421c6d5f85fd6ff19063a79189b2accf255
6
+ lib/doing/wwid.rb a6e14548e14219d46a6fdc1c9c9accb5f4277654
7
7
  lib/doing/array.rb a17004c4811d239932254f9ed94a6eb10456c8e8
8
- lib/doing/hooks.rb 00feacdbf24dc67951c49ca8c1ca9a568441920e
9
- lib/doing/items.rb 0860a0ac7269f59de994ae900c980e49359dc8d5
10
- lib/doing/pager.rb 230c10dea5e9c68b5709a0f4cb088c76970965e4
8
+ lib/doing/hooks.rb acf6e0615ccf1949f84915c979297845242c1205
9
+ lib/doing/items.rb 8cda7caaef10645893267262f5eee681e35046ce
10
+ lib/doing/pager.rb b58e478b0cb8d400ddb97988ba741e3a127b53c3
11
11
  lib/doing/colors.rb 9a628d48c821313c502deedc5b61a046a2bf79ef
12
12
  lib/doing/errors.rb af07e482a5389924edc2337749c81cda501098f0
13
13
  lib/doing/prompt.rb a78b6f4488fe58b5653ce541a88d24559661459c
14
14
  lib/doing/string.rb 7cbe3e0bd136c52f7b12d4d6133afe20fe204be2
15
15
  lib/doing/symbol.rb 309799458a1bc715c2707307c9a62ab26086275e
16
16
  lib/doing/section.rb 206e119cf818f1e76798753e611180fe77bc299a
17
- lib/doing/version.rb 08de25ee059d2e8eae4b3e1b3dac66e0d48461e6
17
+ lib/doing/version.rb d2b8ae34e7fd7354adae5386fe3ed84c88e5dc88
18
18
  lib/doing/cli_status.rb dbedd454c4cbbd0fed9ef30120f6ec85d18b9356
19
19
  lib/doing/completion.rb c658e7dc7898fb022a21b2bd77bedb958ca3b067
20
20
  lib/doing/log_adapter.rb 6cf0c9a405d17449643e54d35a04897b1da44eaf
21
- lib/doing/util_backup.rb 4441a22bdc81e7bba2eb259c522ef819d1b99616
22
- lib/doing/configuration.rb a9aad93aac92f4c5edcde3440654d9e836238364
21
+ lib/doing/util_backup.rb c1bda6ee3acc9a5f649df47590e67ff8b1e90c50
22
+ lib/doing/configuration.rb fc72d4343740a551988a7f56c426a62d51f85e65
23
23
  lib/doing/phrase_parser.rb 8f1789d7cf8326d8cc231b4a21505a93f8de20d2
24
24
  lib/doing/plugin_manager.rb cb16a82c3182ef7008359670ab96ff6b39270ccc
25
25
  lib/doing/string_chronify.rb ccbb08389d2139c7121203f8585864e3026d1526
data/.yardoc/object_types CHANGED
Binary file
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ### 2.1.13
2
+
3
+ #### NEW
4
+
5
+ - --val flag for all display commands, allows tag value queries. Tag values are contained in parenthesis after the tag, e.g. @progress(50). Queries look like `--val "done < two weeks ago"`, "project *= oracle" or "progress >= 50". Wildcards allowed in value, comparators can be <, >, <=, >=, ==, *= (contains), ^= (begins with), $= (ends with). Numeric and date comparisons are detected automatically. Text comparisons are case insensitive. --val can be used multiple times in a command and you can use --bool to specify AND, OR, or NOT (default AND)
6
+ - `doing tag` now accepts a `--value` flag to define a value for a single tag, e.g. @tag(value)
7
+
8
+ #### FIXED
9
+
10
+ - `doing last --editor` errors
11
+
1
12
  ### 2.1.12
2
13
 
3
14
  #### NEW
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- doing (2.1.11)
4
+ doing (2.1.13)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  deep_merge (~> 1.2, >= 1.2.1)
7
7
  gli (~> 2.19, >= 2.19.2)
data/README.md CHANGED
@@ -6,7 +6,7 @@ _If you're one of the rare people like me who find this useful, feel free to [bu
6
6
 
7
7
  <!--README-->
8
8
 
9
- The current version of `doing` is <!--VER-->2.1.11<!--END VER-->.
9
+ The current version of `doing` is <!--VER-->2.1.12<!--END VER-->.
10
10
 
11
11
  Find all of the documentation in the [doing wiki](https://github.com/ttscoff/doing/wiki).
12
12
 
data/bin/doing CHANGED
@@ -27,6 +27,7 @@ autocomplete_commands true
27
27
 
28
28
  REGEX_BOOL = /^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$/i
29
29
  REGEX_SORT_ORDER = /^(?:a(?:sc)?|d(?:esc)?)$/i
30
+ REGEX_VALUE_QUERY = /^(?:!)?@?(?:\S+) +(?:!?[<>=][=*]?|[$*^]=) +(?:.*?)$/
30
31
 
31
32
  InvalidExportType = Class.new(RuntimeError)
32
33
  MissingConfigFile = Class.new(RuntimeError)
@@ -110,7 +111,7 @@ switch %i[q quiet], default_value: false, negatable: false
110
111
  desc 'Verbose output'
111
112
  switch %i[debug], default_value: false, negatable: false
112
113
 
113
- desc 'Use a specific configuration file. Deprecated, set $DOING_CONFIG instead.'
114
+ desc 'Use a specific configuration file. Deprecated, set $DOING_CONFIG instead'
114
115
  flag [:config_file], default_value: config.config_file
115
116
 
116
117
  desc 'Specify a different doing_file'
@@ -120,7 +121,7 @@ flag %i[f doing_file]
120
121
 
121
122
  # @@again @@resume
122
123
  desc 'Repeat last entry as new entry'
123
- long_desc 'This command is designed to allow multiple time intervals to be created for an entry by duplicating it with a new start (and end, eventually) time.'
124
+ long_desc 'This command is designed to allow multiple time intervals to be created for an entry by duplicating it with a new start (and end, eventually) time'
124
125
  command %i[again resume] do |c|
125
126
  c.example 'doing resume', desc: 'Duplicate the most recent entry with a new start time, removing any @done tag'
126
127
  c.example 'doing again', desc: 'again is an alias for resume'
@@ -136,7 +137,7 @@ command %i[again resume] do |c|
136
137
  c.arg_name 'SECTION_NAME'
137
138
  c.flag [:in]
138
139
 
139
- c.desc 'Repeat last entry matching tags. Combine multiple tags with a comma. Wildcards allowed (*, ?).'
140
+ c.desc 'Repeat last entry matching tags. Combine multiple tags with a comma. Wildcards allowed (*, ?)'
140
141
  c.arg_name 'TAG'
141
142
  c.flag [:tag]
142
143
 
@@ -145,6 +146,10 @@ command %i[again resume] do |c|
145
146
  c.arg_name 'QUERY'
146
147
  c.flag [:search]
147
148
 
149
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
150
+ c.arg_name 'QUERY'
151
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
152
+
148
153
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
149
154
  # c.switch [:fuzzy], default_value: false, negatable: false
150
155
 
@@ -158,7 +163,7 @@ command %i[again resume] do |c|
158
163
  c.arg_name 'TYPE'
159
164
  c.flag [:case], must_match: /^[csi]/, default_value: settings.dig('search', 'case')
160
165
 
161
- c.desc 'Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans.'
166
+ c.desc 'Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans'
162
167
  c.arg_name 'BOOLEAN'
163
168
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
164
169
 
@@ -196,7 +201,7 @@ end
196
201
 
197
202
  # @@cancel
198
203
  desc 'End last X entries with no time tracked'
199
- long_desc 'Adds @done tag without datestamp so no elapsed time is recorded. Alias for `doing finish --no-date`.'
204
+ long_desc 'Adds @done tag without datestamp so no elapsed time is recorded. Alias for `doing finish --no-date`'
200
205
  arg_name 'COUNT'
201
206
  command :cancel do |c|
202
207
  c.example 'doing cancel', desc: 'Cancel the last entry'
@@ -209,11 +214,11 @@ command :cancel do |c|
209
214
  c.arg_name 'NAME'
210
215
  c.flag %i[s section]
211
216
 
212
- c.desc 'Cancel the last X entries containing TAG. Separate multiple tags with comma (--tag=tag1,tag2). Wildcards allowed (*, ?).'
217
+ c.desc 'Cancel the last X entries containing TAG. Separate multiple tags with comma (--tag=tag1,tag2). Wildcards allowed (*, ?)'
213
218
  c.arg_name 'TAG'
214
219
  c.flag [:tag]
215
220
 
216
- c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans.'
221
+ c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans'
217
222
  c.arg_name 'BOOLEAN'
218
223
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
219
224
 
@@ -221,6 +226,10 @@ command :cancel do |c|
221
226
  c.arg_name 'QUERY'
222
227
  c.flag [:search]
223
228
 
229
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
230
+ c.arg_name 'QUERY'
231
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
232
+
224
233
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
225
234
  # c.switch [:fuzzy], default_value: false, negatable: false
226
235
 
@@ -285,7 +294,8 @@ command :cancel do |c|
285
294
  tag: tags,
286
295
  tag_bool: options[:bool].normalize_bool,
287
296
  tags: ['done'],
288
- unfinished: options[:unfinished]
297
+ unfinished: options[:unfinished],
298
+ val: options[:val]
289
299
  }
290
300
 
291
301
  wwid.tag_last(opts)
@@ -293,7 +303,7 @@ command :cancel do |c|
293
303
  end
294
304
 
295
305
  # @@done @@did
296
- desc 'Add a completed item with @done(date). No argument finishes last entry.'
306
+ desc 'Add a completed item with @done(date). No argument finishes last entry'
297
307
  long_desc 'Use this command to add an entry after you\'ve already finished it. It will be immediately marked as @done.
298
308
  You can modify the start and end times of the entry using the --back, --took, and --at flags, making it an easy
299
309
  way to add entries in post and maintain accurate (albeit manual) time tracking.'
@@ -535,6 +545,10 @@ command :finish do |c|
535
545
  c.arg_name 'QUERY'
536
546
  c.flag [:search]
537
547
 
548
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
549
+ c.arg_name 'QUERY'
550
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
551
+
538
552
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
539
553
  # c.switch [:fuzzy], default_value: false, negatable: false
540
554
 
@@ -548,7 +562,7 @@ command :finish do |c|
548
562
  c.arg_name 'TYPE'
549
563
  c.flag [:case], must_match: /^[csi]/, default_value: settings.dig('search', 'case')
550
564
 
551
- c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans.'
565
+ c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans'
552
566
  c.arg_name 'BOOLEAN'
553
567
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
554
568
 
@@ -641,7 +655,8 @@ command :finish do |c|
641
655
  tag_bool: options[:bool].normalize_bool,
642
656
  tags: ['done'],
643
657
  took: options[:took],
644
- unfinished: options[:unfinished]
658
+ unfinished: options[:unfinished],
659
+ val: options[:val]
645
660
  }
646
661
 
647
662
  wwid.tag_last(opts)
@@ -745,6 +760,10 @@ command %i[mark flag] do |c|
745
760
  c.arg_name 'QUERY'
746
761
  c.flag [:search]
747
762
 
763
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
764
+ c.arg_name 'QUERY'
765
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
766
+
748
767
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
749
768
  # c.switch [:fuzzy], default_value: false, negatable: false
750
769
 
@@ -758,7 +777,7 @@ command %i[mark flag] do |c|
758
777
  c.arg_name 'TYPE'
759
778
  c.flag [:case], must_match: /^[csi]/, default_value: settings.dig('search', 'case')
760
779
 
761
- c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans.'
780
+ c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans'
762
781
  c.arg_name 'BOOLEAN'
763
782
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
764
783
 
@@ -937,7 +956,7 @@ command :note do |c|
937
956
  c.desc "Replace/Remove last entry's note (default append)"
938
957
  c.switch %i[r remove], negatable: false, default_value: false
939
958
 
940
- c.desc 'Add/remove note from last entry matching tag. Wildcards allowed (*, ?).'
959
+ c.desc 'Add/remove note from last entry matching tag. Wildcards allowed (*, ?)'
941
960
  c.arg_name 'TAG'
942
961
  c.flag [:tag]
943
962
 
@@ -945,6 +964,10 @@ command :note do |c|
945
964
  c.arg_name 'QUERY'
946
965
  c.flag [:search]
947
966
 
967
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
968
+ c.arg_name 'QUERY'
969
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
970
+
948
971
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
949
972
  # c.switch [:fuzzy], default_value: false, negatable: false
950
973
 
@@ -958,7 +981,7 @@ command :note do |c|
958
981
  c.arg_name 'TYPE'
959
982
  c.flag [:case], must_match: /^[csi]/, default_value: settings.dig('search', 'case')
960
983
 
961
- c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans.'
984
+ c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans'
962
985
  c.arg_name 'BOOLEAN'
963
986
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
964
987
 
@@ -1135,7 +1158,7 @@ command %i[reset begin] do |c|
1135
1158
  c.desc 'Resume entry (remove @done)'
1136
1159
  c.switch %i[r resume], default_value: true
1137
1160
 
1138
- c.desc 'Reset last entry matching tag. Wildcards allowed (*, ?).'
1161
+ c.desc 'Reset last entry matching tag. Wildcards allowed (*, ?)'
1139
1162
  c.arg_name 'TAG'
1140
1163
  c.flag [:tag]
1141
1164
 
@@ -1143,6 +1166,10 @@ command %i[reset begin] do |c|
1143
1166
  c.arg_name 'QUERY'
1144
1167
  c.flag [:search]
1145
1168
 
1169
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
1170
+ c.arg_name 'QUERY'
1171
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
1172
+
1146
1173
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
1147
1174
  # c.switch [:fuzzy], default_value: false, negatable: false
1148
1175
 
@@ -1156,7 +1183,7 @@ command %i[reset begin] do |c|
1156
1183
  c.arg_name 'TYPE'
1157
1184
  c.flag [:case], must_match: /^[csi]/, default_value: settings.dig('search', 'case')
1158
1185
 
1159
- c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters'
1186
+ c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans'
1160
1187
  c.arg_name 'BOOLEAN'
1161
1188
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
1162
1189
 
@@ -1258,11 +1285,15 @@ command :select do |c|
1258
1285
  c.arg_name 'QUERY'
1259
1286
  c.flag %i[q query search]
1260
1287
 
1261
- c.desc 'Select from entries older than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day.'
1288
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
1289
+ c.arg_name 'QUERY'
1290
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
1291
+
1292
+ c.desc 'Select from entries older than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day'
1262
1293
  c.arg_name 'DATE_STRING'
1263
1294
  c.flag [:before]
1264
1295
 
1265
- c.desc 'Select from entries newer than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day.'
1296
+ c.desc 'Select from entries newer than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day'
1266
1297
  c.arg_name 'DATE_STRING'
1267
1298
  c.flag [:after]
1268
1299
 
@@ -1287,7 +1318,7 @@ command :select do |c|
1287
1318
  c.arg_name 'TYPE'
1288
1319
  c.flag [:case], must_match: /^[csi]/, default_value: settings.dig('search', 'case')
1289
1320
 
1290
- c.desc 'Use --no-menu to skip the interactive menu. Use with --query to filter items and act on results automatically. Test with `--output doing` to preview matches.'
1321
+ c.desc 'Use --no-menu to skip the interactive menu. Use with --query to filter items and act on results automatically. Test with `--output doing` to preview matches'
1291
1322
  c.switch %i[menu], negatable: true, default_value: true
1292
1323
 
1293
1324
  c.desc 'Cancel selected items (add @done without timestamp)'
@@ -1305,7 +1336,7 @@ command :select do |c|
1305
1336
  c.desc 'Add flag to selected item(s)'
1306
1337
  c.switch %i[flag], negatable: false, default_value: false
1307
1338
 
1308
- c.desc 'Perform action without confirmation.'
1339
+ c.desc 'Perform action without confirmation'
1309
1340
  c.switch %i[force], negatable: false, default_value: false
1310
1341
 
1311
1342
  c.desc 'Save selected entries to file using --output format'
@@ -1365,6 +1396,10 @@ command :tag do |c|
1365
1396
  c.arg_name 'ORIG_TAG'
1366
1397
  c.flag %i[rename]
1367
1398
 
1399
+ c.desc 'Include a value, e.g. @tag(value)'
1400
+ c.arg_name 'VALUE'
1401
+ c.flag %i[v value]
1402
+
1368
1403
  c.desc 'Don\'t ask permission to tag all entries when count is 0'
1369
1404
  c.switch %i[force], negatable: false, default_value: false
1370
1405
 
@@ -1392,6 +1427,10 @@ command :tag do |c|
1392
1427
  c.arg_name 'QUERY'
1393
1428
  c.flag [:search]
1394
1429
 
1430
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
1431
+ c.arg_name 'QUERY'
1432
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
1433
+
1395
1434
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
1396
1435
  # c.switch [:fuzzy], default_value: false, negatable: false
1397
1436
 
@@ -1405,7 +1444,7 @@ command :tag do |c|
1405
1444
  c.arg_name 'TYPE'
1406
1445
  c.flag [:case], must_match: /^[csi]/, default_value: settings.dig('search', 'case')
1407
1446
 
1408
- c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans.'
1447
+ c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans'
1409
1448
  c.arg_name 'BOOLEAN'
1410
1449
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
1411
1450
 
@@ -1528,11 +1567,11 @@ command %i[grep search] do |c|
1528
1567
  c.arg_name 'NAME'
1529
1568
  c.flag %i[s section], default_value: 'All'
1530
1569
 
1531
- c.desc 'Search entries older than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day.'
1570
+ c.desc 'Search entries older than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day'
1532
1571
  c.arg_name 'DATE_STRING'
1533
1572
  c.flag [:before]
1534
1573
 
1535
- c.desc 'Search entries newer than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day.'
1574
+ c.desc 'Search entries newer than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day'
1536
1575
  c.arg_name 'DATE_STRING'
1537
1576
  c.flag [:after]
1538
1577
 
@@ -1591,6 +1630,13 @@ command %i[grep search] do |c|
1591
1630
  c.desc 'Display an interactive menu of results to perform further operations'
1592
1631
  c.switch %i[i interactive], default_value: false, negatable: false
1593
1632
 
1633
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
1634
+ c.arg_name 'QUERY'
1635
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
1636
+
1637
+ c.desc 'Combine multiple tags or value queries using AND, OR, or NOT'
1638
+ c.flag [:bool], must_match: REGEX_BOOL, default_value: 'AND'
1639
+
1594
1640
  c.action do |_global_options, options, args|
1595
1641
  options[:fuzzy] = false
1596
1642
  raise DoingRuntimeError, %(Invalid output type "#{options[:output]}") if options[:output] && options[:output] !~ Doing::Plugins.plugin_regex(type: :export)
@@ -1601,6 +1647,7 @@ command %i[grep search] do |c|
1601
1647
  section = wwid.guess_section(options[:section]) if options[:section]
1602
1648
 
1603
1649
  options[:case] = options[:case].normalize_case
1650
+ options[:bool] = options[:bool].normalize_bool
1604
1651
 
1605
1652
  search = args.join(' ')
1606
1653
  search.sub!(/^'?/, "'") if options[:exact]
@@ -1639,11 +1686,11 @@ command :last do |c|
1639
1686
  c.desc "Delete the last entry"
1640
1687
  c.switch %i[d delete], negatable: false, default_value: false
1641
1688
 
1642
- c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?).'
1689
+ c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?)'
1643
1690
  c.arg_name 'TAG'
1644
1691
  c.flag [:tag]
1645
1692
 
1646
- c.desc 'Tag boolean (AND|OR|NOT). Use PATTERN to parse + and - as booleans.'
1693
+ c.desc 'Tag boolean (AND|OR|NOT). Use PATTERN to parse + and - as booleans'
1647
1694
  c.arg_name 'BOOLEAN'
1648
1695
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
1649
1696
 
@@ -1651,6 +1698,10 @@ command :last do |c|
1651
1698
  c.arg_name 'QUERY'
1652
1699
  c.flag [:search]
1653
1700
 
1701
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
1702
+ c.arg_name 'QUERY'
1703
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
1704
+
1654
1705
  c.desc 'Show elapsed time if entry is not tagged @done'
1655
1706
  c.switch [:duration]
1656
1707
 
@@ -1685,12 +1736,14 @@ command :last do |c|
1685
1736
  if options[:editor]
1686
1737
  wwid.edit_last(section: options[:section],
1687
1738
  options: {
1688
- search: search,
1739
+ search: options[:search],
1689
1740
  fuzzy: options[:fuzzy],
1690
1741
  case: options[:case],
1691
- tag: tags,
1742
+ tag: options[:tag],
1692
1743
  tag_bool: options[:bool],
1693
- not: options[:not]
1744
+ not: options[:not],
1745
+ val: options[:val],
1746
+ bool: options[:bool]
1694
1747
  })
1695
1748
  else
1696
1749
  last = wwid.last(times: true, section: options[:section],
@@ -1702,7 +1755,9 @@ command :last do |c|
1702
1755
  negate: options[:not],
1703
1756
  tag: options[:tag],
1704
1757
  tag_bool: options[:bool],
1705
- delete: options[:delete]
1758
+ delete: options[:delete],
1759
+ bool: options[:bool],
1760
+ val: options[:val]
1706
1761
  })
1707
1762
  Doing::Pager::page last.strip if last
1708
1763
  end
@@ -1798,11 +1853,15 @@ command :show do |c|
1798
1853
  c.example 'doing show Ideas @doing --from "mon to fri"', desc: 'Show entries tagged @doing from the Ideas section added between monday and friday of the current week.'
1799
1854
  c.example 'doing show --interactive Later @doing', desc: 'Create a menu from entries from the Later section tagged @doing to perform batch actions'
1800
1855
 
1801
- c.desc 'Tag filter, combine multiple tags with a comma. Use `--tag pick` for a menu of available tags. Wildcards allowed (*, ?). Added for compatibility with other commands.'
1856
+ c.desc 'Tag filter, combine multiple tags with a comma. Use `--tag pick` for a menu of available tags. Wildcards allowed (*, ?). Added for compatibility with other commands'
1802
1857
  c.arg_name 'TAG'
1803
1858
  c.flag [:tag]
1804
1859
 
1805
- c.desc 'Tag boolean (AND,OR,NOT). Use PATTERN to parse + and - as booleans.'
1860
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
1861
+ c.arg_name 'QUERY'
1862
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
1863
+
1864
+ c.desc 'Tag boolean (AND,OR,NOT). Use PATTERN to parse + and - as booleans'
1806
1865
  c.arg_name 'BOOLEAN'
1807
1866
  c.flag %i[b bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
1808
1867
 
@@ -1814,11 +1873,11 @@ command :show do |c|
1814
1873
  c.arg_name 'AGE'
1815
1874
  c.flag %i[a age], default_value: 'newest'
1816
1875
 
1817
- c.desc 'Show entries older than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day.'
1876
+ c.desc 'Show entries older than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day'
1818
1877
  c.arg_name 'DATE_STRING'
1819
1878
  c.flag [:before]
1820
1879
 
1821
- c.desc 'Show entries newer than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day.'
1880
+ c.desc 'Show entries newer than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day'
1822
1881
  c.arg_name 'DATE_STRING'
1823
1882
  c.flag [:after]
1824
1883
 
@@ -2012,7 +2071,7 @@ command :tags do |c|
2012
2071
  c.arg_name 'ORDER'
2013
2072
  c.flag %i[o order], must_match: REGEX_SORT_ORDER, default_value: 'asc'
2014
2073
 
2015
- c.desc 'Get tags for entries matching tags. Combine multiple tags with a comma. Wildcards allowed (*, ?).'
2074
+ c.desc 'Get tags for entries matching tags. Combine multiple tags with a comma. Wildcards allowed (*, ?)'
2016
2075
  c.arg_name 'TAG'
2017
2076
  c.flag [:tag]
2018
2077
 
@@ -2021,6 +2080,10 @@ command :tags do |c|
2021
2080
  c.arg_name 'QUERY'
2022
2081
  c.flag [:search]
2023
2082
 
2083
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
2084
+ c.arg_name 'QUERY'
2085
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
2086
+
2024
2087
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
2025
2088
  # c.switch [:fuzzy], default_value: false, negatable: false
2026
2089
 
@@ -2034,7 +2097,7 @@ command :tags do |c|
2034
2097
  c.arg_name 'TYPE'
2035
2098
  c.flag [:case], must_match: /^[csi]/, default_value: settings.dig('search', 'case')
2036
2099
 
2037
- c.desc 'Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans.'
2100
+ c.desc 'Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans'
2038
2101
  c.arg_name 'BOOLEAN'
2039
2102
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
2040
2103
 
@@ -2291,11 +2354,15 @@ command :view do |c|
2291
2354
  c.desc 'Include colors in output'
2292
2355
  c.switch [:color], default_value: true, negatable: true
2293
2356
 
2294
- c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?).'
2357
+ c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?)'
2295
2358
  c.arg_name 'TAG'
2296
2359
  c.flag [:tag]
2297
2360
 
2298
- c.desc 'Tag boolean (AND,OR,NOT). Use PATTERN to parse + and - as booleans.'
2361
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
2362
+ c.arg_name 'QUERY'
2363
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
2364
+
2365
+ c.desc 'Tag boolean (AND,OR,NOT). Use PATTERN to parse + and - as booleans'
2299
2366
  c.arg_name 'BOOLEAN'
2300
2367
  c.flag %i[b bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
2301
2368
 
@@ -2324,11 +2391,11 @@ command :view do |c|
2324
2391
  c.arg_name 'DIRECTION'
2325
2392
  c.flag [:tag_order], must_match: REGEX_SORT_ORDER
2326
2393
 
2327
- c.desc 'View entries older than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day.'
2394
+ c.desc 'View entries older than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day'
2328
2395
  c.arg_name 'DATE_STRING'
2329
2396
  c.flag [:before]
2330
2397
 
2331
- c.desc 'View entries newer than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day.'
2398
+ c.desc 'View entries newer than date. If this is only a time (8am, 1:30pm, 15:00), all dates will be included, but entries will be filtered by time of day'
2332
2399
  c.arg_name 'DATE_STRING'
2333
2400
  c.flag [:after]
2334
2401
 
@@ -2935,11 +3002,11 @@ command %i[archive move] do |c|
2935
3002
  c.desc 'Label moved items with @from(SECTION_NAME)'
2936
3003
  c.switch [:label], default_value: true, negatable: true
2937
3004
 
2938
- c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?). Added for compatibility with other commands.'
3005
+ c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?). Added for compatibility with other commands'
2939
3006
  c.arg_name 'TAG'
2940
3007
  c.flag [:tag]
2941
3008
 
2942
- c.desc 'Tag boolean (AND|OR|NOT). Use PATTERN to parse + and - as booleans.'
3009
+ c.desc 'Tag boolean (AND|OR|NOT). Use PATTERN to parse + and - as booleans'
2943
3010
  c.arg_name 'BOOLEAN'
2944
3011
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
2945
3012
 
@@ -2947,6 +3014,10 @@ command %i[archive move] do |c|
2947
3014
  c.arg_name 'QUERY'
2948
3015
  c.flag [:search]
2949
3016
 
3017
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
3018
+ c.arg_name 'QUERY'
3019
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
3020
+
2950
3021
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
2951
3022
  # c.switch [:fuzzy], default_value: false, negatable: false
2952
3023
 
@@ -3122,11 +3193,11 @@ command :rotate do |c|
3122
3193
  c.arg_name 'SECTION_NAME'
3123
3194
  c.flag %i[s section], default_value: 'All'
3124
3195
 
3125
- c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?). Added for compatibility with other commands.'
3196
+ c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?). Added for compatibility with other commands'
3126
3197
  c.arg_name 'TAG'
3127
3198
  c.flag [:tag]
3128
3199
 
3129
- c.desc 'Tag boolean (AND|OR|NOT). Use PATTERN to parse + and - as booleans.'
3200
+ c.desc 'Tag boolean (AND|OR|NOT). Use PATTERN to parse + and - as booleans'
3130
3201
  c.arg_name 'BOOLEAN'
3131
3202
  c.flag [:bool], must_match: REGEX_BOOL, default_value: 'PATTERN'
3132
3203
 
@@ -3134,6 +3205,10 @@ command :rotate do |c|
3134
3205
  c.arg_name 'QUERY'
3135
3206
  c.flag [:search]
3136
3207
 
3208
+ c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
3209
+ c.arg_name 'QUERY'
3210
+ c.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
3211
+
3137
3212
  # c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
3138
3213
  # c.switch [:fuzzy], default_value: false, negatable: false
3139
3214
 
@@ -3357,7 +3432,7 @@ command :undo do |c|
3357
3432
  c.arg_name 'COUNT'
3358
3433
  c.flag %i[p prune], type: Integer
3359
3434
 
3360
- c.desc 'Redo last undo. Note: you cannot undo a redo.'
3435
+ c.desc 'Redo last undo. Note: you cannot undo a redo'
3361
3436
  c.switch %i[r redo]
3362
3437
 
3363
3438
  c.action do |_global_options, options, args|
@@ -3384,7 +3459,7 @@ command :undo do |c|
3384
3459
  end
3385
3460
 
3386
3461
  # @@redo
3387
- long_desc 'Shortcut for `doing undo -r`, reverses the last undo command. You cannot undo a redo.'
3462
+ long_desc 'Shortcut for `doing undo -r`, reverses the last undo command. You cannot undo a redo'
3388
3463
  arg_name 'COUNT'
3389
3464
  command :redo do |c|
3390
3465
  c.desc 'Specify alternate doing file'
data/docs/doc/Array.html CHANGED
@@ -540,7 +540,7 @@ with</p>
540
540
  </div>
541
541
 
542
542
  <div id="footer">
543
- Generated on Tue Dec 21 14:44:17 2021 by
543
+ Generated on Fri Jan 14 21:59:14 2022 by
544
544
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
545
545
  0.9.26 (ruby-3.0.1).
546
546
  </div>
@@ -283,7 +283,7 @@
283
283
  </div>
284
284
 
285
285
  <div id="footer">
286
- Generated on Tue Dec 21 14:44:17 2021 by
286
+ Generated on Fri Jan 14 21:59:14 2022 by
287
287
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
288
288
  0.9.26 (ruby-3.0.1).
289
289
  </div>
@@ -162,7 +162,7 @@
162
162
  </div>
163
163
 
164
164
  <div id="footer">
165
- Generated on Tue Dec 21 14:44:17 2021 by
165
+ Generated on Fri Jan 14 21:59:14 2022 by
166
166
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
167
167
  0.9.26 (ruby-3.0.1).
168
168
  </div>
@@ -407,7 +407,7 @@
407
407
  </div>
408
408
 
409
409
  <div id="footer">
410
- Generated on Tue Dec 21 14:44:17 2021 by
410
+ Generated on Fri Jan 14 21:59:14 2022 by
411
411
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
412
412
  0.9.26 (ruby-3.0.1).
413
413
  </div>
@@ -125,7 +125,7 @@ parser. In order to do that, a new &quot;clause&quot; node is added to the parse
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Tue Dec 21 14:44:17 2021 by
128
+ Generated on Fri Jan 14 21:59:14 2022 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
130
  0.9.26 (ruby-3.0.1).
131
131
  </div>