doing 2.1.32 → 2.1.33

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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/Gemfile.lock +1 -1
  4. data/docs/doc/Array.html +1 -1
  5. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  6. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  7. data/docs/doc/BooleanTermParser/Query.html +1 -1
  8. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  9. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  10. data/docs/doc/BooleanTermParser.html +1 -1
  11. data/docs/doc/Doing/Color.html +1 -1
  12. data/docs/doc/Doing/Completion.html +1 -1
  13. data/docs/doc/Doing/Configuration.html +1 -1
  14. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  15. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  16. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  17. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  18. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  19. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  20. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  21. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  22. data/docs/doc/Doing/Errors.html +1 -1
  23. data/docs/doc/Doing/Hooks.html +1 -1
  24. data/docs/doc/Doing/Item.html +1 -1
  25. data/docs/doc/Doing/Items.html +1 -1
  26. data/docs/doc/Doing/LogAdapter.html +1 -1
  27. data/docs/doc/Doing/Note.html +1 -1
  28. data/docs/doc/Doing/Pager.html +1 -1
  29. data/docs/doc/Doing/Plugins.html +1 -1
  30. data/docs/doc/Doing/Prompt.html +1 -1
  31. data/docs/doc/Doing/Section.html +1 -1
  32. data/docs/doc/Doing/TemplateString.html +1 -1
  33. data/docs/doc/Doing/Types.html +2 -2
  34. data/docs/doc/Doing/Util/Backup.html +1 -1
  35. data/docs/doc/Doing/Util.html +1 -1
  36. data/docs/doc/Doing/WWID.html +1 -1
  37. data/docs/doc/Doing.html +2 -2
  38. data/docs/doc/FalseClass.html +1 -1
  39. data/docs/doc/GLI/Commands/Help.html +1 -1
  40. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  41. data/docs/doc/GLI/Commands.html +1 -1
  42. data/docs/doc/GLI.html +1 -1
  43. data/docs/doc/Hash.html +1 -1
  44. data/docs/doc/Object.html +1 -1
  45. data/docs/doc/PhraseParser/Operator.html +1 -1
  46. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  47. data/docs/doc/PhraseParser/Query.html +1 -1
  48. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  49. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  50. data/docs/doc/PhraseParser/TermClause.html +1 -1
  51. data/docs/doc/PhraseParser.html +1 -1
  52. data/docs/doc/Status.html +1 -1
  53. data/docs/doc/String.html +1 -1
  54. data/docs/doc/Symbol.html +1 -1
  55. data/docs/doc/Time.html +1 -1
  56. data/docs/doc/TrueClass.html +1 -1
  57. data/docs/doc/_index.html +1 -1
  58. data/docs/doc/file.README.html +1 -1
  59. data/docs/doc/index.html +1 -1
  60. data/docs/doc/top-level-namespace.html +1 -1
  61. data/doing.rdoc +2 -2
  62. data/lib/completion/_doing.zsh +45 -45
  63. data/lib/completion/doing.bash +493 -0
  64. data/lib/completion/doing.fish +2 -1
  65. data/lib/doing/completion/bash_completion.rb +1 -1
  66. data/lib/doing/completion/fish_completion.rb +2 -2
  67. data/lib/doing/completion/zsh_completion.rb +10 -4
  68. data/lib/doing/types.rb +1 -1
  69. data/lib/doing/version.rb +1 -1
  70. metadata +2 -1
@@ -0,0 +1,493 @@
1
+ _doing_again() {
2
+
3
+ if [[ "$token" == --* ]]; then
4
+ COMPREPLY=( $( compgen -W '--noauto --ask --started --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
5
+ elif [[ "$token" == -* ]]; then
6
+ COMPREPLY=( $( compgen -W '-X -e -i -n -s -x --noauto --ask --started --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
7
+
8
+ fi
9
+ }
10
+
11
+ _doing_archive() {
12
+ OLD_IFS="$IFS"
13
+ local token=${COMP_WORDS[$COMP_CWORD]}
14
+ IFS=$' '
15
+ local words=$(doing sections)
16
+ IFS="$OLD_IFS"
17
+
18
+ if [[ "$token" == --* ]]; then
19
+ COMPREPLY=( $( compgen -W '--after --before --bool --case --from --keep --label --not --search --to --tag --val --exact' -- $token ) )
20
+ elif [[ "$token" == -* ]]; then
21
+ COMPREPLY=( $( compgen -W '-k -t -x --after --before --bool --case --from --keep --label --not --search --to --tag --val --exact' -- $token ) )
22
+ else
23
+ local nocasematchWasOff=0
24
+ shopt nocasematch >/dev/null || nocasematchWasOff=1
25
+ (( nocasematchWasOff )) && shopt -s nocasematch
26
+ local w matches=()
27
+ OLD_IFS="$IFS"
28
+ IFS=$' '‰
29
+ for w in $words; do
30
+ if [[ "$w" == "$token"* ]]; then
31
+ matches+=("${w// / }")
32
+ fi
33
+ done
34
+ IFS="$OLD_IFS"
35
+ (( nocasematchWasOff )) && shopt -u nocasematch
36
+ COMPREPLY=("${matches[@]}")
37
+
38
+ fi
39
+ }
40
+
41
+ _doing_autotag() {
42
+
43
+ if [[ "$token" == --* ]]; then
44
+ COMPREPLY=( $( compgen -W '--bool --count --force --interactive --section --search --tag --unfinished' -- $token ) )
45
+ elif [[ "$token" == -* ]]; then
46
+ COMPREPLY=( $( compgen -W '-c -i -s -u --bool --count --force --interactive --section --search --tag --unfinished' -- $token ) )
47
+
48
+ fi
49
+ }
50
+
51
+ _doing_cancel() {
52
+
53
+ if [[ "$token" == --* ]]; then
54
+ COMPREPLY=( $( compgen -W '--archive --bool --case --interactive --not --section --search --tag --unfinished --val --exact' -- $token ) )
55
+ elif [[ "$token" == -* ]]; then
56
+ COMPREPLY=( $( compgen -W '-a -i -s -u -x --archive --bool --case --interactive --not --section --search --tag --unfinished --val --exact' -- $token ) )
57
+
58
+ fi
59
+ }
60
+
61
+ _doing_changes() {
62
+
63
+ if [[ "$token" == --* ]]; then
64
+ COMPREPLY=( $( compgen -W '--changes --all --interactive --lookup --markdown --render --search --sort' -- $token ) )
65
+ elif [[ "$token" == -* ]]; then
66
+ COMPREPLY=( $( compgen -W '-C -a -i -l -s --changes --all --interactive --lookup --markdown --render --search --sort' -- $token ) )
67
+
68
+ fi
69
+ }
70
+
71
+ _doing_completion() {
72
+
73
+ if [[ "$token" == --* ]]; then
74
+ COMPREPLY=( $( compgen -W '--type' -- $token ) )
75
+ elif [[ "$token" == -* ]]; then
76
+ COMPREPLY=( $( compgen -W '-t --type' -- $token ) )
77
+
78
+ fi
79
+ }
80
+
81
+ _doing_config() {
82
+
83
+ if [[ "$token" == --* ]]; then
84
+ COMPREPLY=( $( compgen -W '--dump --update' -- $token ) )
85
+ elif [[ "$token" == -* ]]; then
86
+ COMPREPLY=( $( compgen -W '-d -u --dump --update' -- $token ) )
87
+
88
+ fi
89
+ }
90
+
91
+ _doing_done() {
92
+
93
+ if [[ "$token" == --* ]]; then
94
+ COMPREPLY=( $( compgen -W '--noauto --archive --ask --finished --started --date --editor --from --note --remove --section --for --unfinished' -- $token ) )
95
+ elif [[ "$token" == -* ]]; then
96
+ COMPREPLY=( $( compgen -W '-X -a -e -n -r -s -u --noauto --archive --ask --finished --started --date --editor --from --note --remove --section --for --unfinished' -- $token ) )
97
+
98
+ fi
99
+ }
100
+
101
+ _doing_finish() {
102
+
103
+ if [[ "$token" == --* ]]; then
104
+ COMPREPLY=( $( compgen -W '--archive --finished --auto --started --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --update --val --exact' -- $token ) )
105
+ elif [[ "$token" == -* ]]; then
106
+ COMPREPLY=( $( compgen -W '-a -i -r -s -u -x --archive --finished --auto --started --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --update --val --exact' -- $token ) )
107
+
108
+ fi
109
+ }
110
+
111
+ _doing_grep() {
112
+
113
+ if [[ "$token" == --* ]]; then
114
+ COMPREPLY=( $( compgen -W '--after --before --bool --case --config_template --delete --duration --editor --from --hilite --interactive --not --output --only_timed --section --times --tag_sort --template --totals --val --exact' -- $token ) )
115
+ elif [[ "$token" == -* ]]; then
116
+ COMPREPLY=( $( compgen -W '-d -e -h -i -o -s -t -x --after --before --bool --case --config_template --delete --duration --editor --from --hilite --interactive --not --output --only_timed --section --times --tag_sort --template --totals --val --exact' -- $token ) )
117
+
118
+ fi
119
+ }
120
+
121
+ _doing_help() {
122
+
123
+ if [[ "$token" == --* ]]; then
124
+ COMPREPLY=( $( compgen -W '' -- $token ) )
125
+ elif [[ "$token" == -* ]]; then
126
+ COMPREPLY=( $( compgen -W ' ' -- $token ) )
127
+
128
+ fi
129
+ }
130
+
131
+ _doing_import() {
132
+
133
+ if [[ "$token" == --* ]]; then
134
+ COMPREPLY=( $( compgen -W '--after --autotag --before --case --from --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
135
+ elif [[ "$token" == -* ]]; then
136
+ COMPREPLY=( $( compgen -W '-s -t -x --after --autotag --before --case --from --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
137
+
138
+ fi
139
+ }
140
+
141
+ _doing_last() {
142
+
143
+ if [[ "$token" == --* ]]; then
144
+ COMPREPLY=( $( compgen -W '--bool --case --config_template --delete --duration --editor --hilite --not --section --search --tag --template --val --exact' -- $token ) )
145
+ elif [[ "$token" == -* ]]; then
146
+ COMPREPLY=( $( compgen -W '-d -e -h -s -x --bool --case --config_template --delete --duration --editor --hilite --not --section --search --tag --template --val --exact' -- $token ) )
147
+
148
+ fi
149
+ }
150
+
151
+ _doing_mark() {
152
+
153
+ if [[ "$token" == --* ]]; then
154
+ COMPREPLY=( $( compgen -W '--bool --count --case --date --force --interactive --not --remove --section --search --tag --unfinished --val --exact' -- $token ) )
155
+ elif [[ "$token" == -* ]]; then
156
+ COMPREPLY=( $( compgen -W '-c -d -i -r -s -u -x --bool --count --case --date --force --interactive --not --remove --section --search --tag --unfinished --val --exact' -- $token ) )
157
+
158
+ fi
159
+ }
160
+
161
+ _doing_meanwhile() {
162
+
163
+ if [[ "$token" == --* ]]; then
164
+ COMPREPLY=( $( compgen -W '--noauto --archive --ask --started --editor --note --section' -- $token ) )
165
+ elif [[ "$token" == -* ]]; then
166
+ COMPREPLY=( $( compgen -W '-X -a -e -n -s --noauto --archive --ask --started --editor --note --section' -- $token ) )
167
+
168
+ fi
169
+ }
170
+
171
+ _doing_note() {
172
+
173
+ if [[ "$token" == --* ]]; then
174
+ COMPREPLY=( $( compgen -W '--ask --bool --case --editor --interactive --not --remove --section --search --tag --val --exact' -- $token ) )
175
+ elif [[ "$token" == -* ]]; then
176
+ COMPREPLY=( $( compgen -W '-e -i -r -s -x --ask --bool --case --editor --interactive --not --remove --section --search --tag --val --exact' -- $token ) )
177
+
178
+ fi
179
+ }
180
+
181
+ _doing_now() {
182
+
183
+ if [[ "$token" == --* ]]; then
184
+ COMPREPLY=( $( compgen -W '--noauto --ask --started --editor --finish_last --from --note --section' -- $token ) )
185
+ elif [[ "$token" == -* ]]; then
186
+ COMPREPLY=( $( compgen -W '-X -e -f -n -s --noauto --ask --started --editor --finish_last --from --note --section' -- $token ) )
187
+
188
+ fi
189
+ }
190
+
191
+ _doing_on() {
192
+
193
+ if [[ "$token" == --* ]]; then
194
+ COMPREPLY=( $( compgen -W '--config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
195
+ elif [[ "$token" == -* ]]; then
196
+ COMPREPLY=( $( compgen -W '-o -s -t --config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
197
+
198
+ fi
199
+ }
200
+
201
+ _doing_open() {
202
+
203
+ if [[ "$token" == --* ]]; then
204
+ COMPREPLY=( $( compgen -W '--app --bundle_id --editor' -- $token ) )
205
+ elif [[ "$token" == -* ]]; then
206
+ COMPREPLY=( $( compgen -W '-a -b -e --app --bundle_id --editor' -- $token ) )
207
+
208
+ fi
209
+ }
210
+
211
+ _doing_plugins() {
212
+
213
+ if [[ "$token" == --* ]]; then
214
+ COMPREPLY=( $( compgen -W '--column --type' -- $token ) )
215
+ elif [[ "$token" == -* ]]; then
216
+ COMPREPLY=( $( compgen -W '-c -t --column --type' -- $token ) )
217
+
218
+ fi
219
+ }
220
+
221
+ _doing_recent() {
222
+
223
+ if [[ "$token" == --* ]]; then
224
+ COMPREPLY=( $( compgen -W '--config_template --duration --interactive --section --times --tag_sort --template --totals' -- $token ) )
225
+ elif [[ "$token" == -* ]]; then
226
+ COMPREPLY=( $( compgen -W '-i -s -t --config_template --duration --interactive --section --times --tag_sort --template --totals' -- $token ) )
227
+
228
+ fi
229
+ }
230
+
231
+ _doing_redo() {
232
+
233
+ if [[ "$token" == --* ]]; then
234
+ COMPREPLY=( $( compgen -W '--file --interactive' -- $token ) )
235
+ elif [[ "$token" == -* ]]; then
236
+ COMPREPLY=( $( compgen -W '-f -i --file --interactive' -- $token ) )
237
+
238
+ fi
239
+ }
240
+
241
+ _doing_reset() {
242
+
243
+ if [[ "$token" == --* ]]; then
244
+ COMPREPLY=( $( compgen -W '--bool --case --interactive --not --resume --section --search --tag --val --exact' -- $token ) )
245
+ elif [[ "$token" == -* ]]; then
246
+ COMPREPLY=( $( compgen -W '-i -r -s -x --bool --case --interactive --not --resume --section --search --tag --val --exact' -- $token ) )
247
+
248
+ fi
249
+ }
250
+
251
+ _doing_rotate() {
252
+
253
+ if [[ "$token" == --* ]]; then
254
+ COMPREPLY=( $( compgen -W '--before --bool --case --keep --not --section --search --tag --val --exact' -- $token ) )
255
+ elif [[ "$token" == -* ]]; then
256
+ COMPREPLY=( $( compgen -W '-k -s -x --before --bool --case --keep --not --section --search --tag --val --exact' -- $token ) )
257
+
258
+ fi
259
+ }
260
+
261
+ _doing_sections() {
262
+
263
+ if [[ "$token" == --* ]]; then
264
+ COMPREPLY=( $( compgen -W '--column' -- $token ) )
265
+ elif [[ "$token" == -* ]]; then
266
+ COMPREPLY=( $( compgen -W '-c --column' -- $token ) )
267
+
268
+ fi
269
+ }
270
+
271
+ _doing_select() {
272
+
273
+ if [[ "$token" == --* ]]; then
274
+ COMPREPLY=( $( compgen -W '--archive --after --resume --before --cancel --case --delete --editor --finish --flag --force --from --move --menu --not --output --query --remove --section --save_to --search --tag --val --exact' -- $token ) )
275
+ elif [[ "$token" == -* ]]; then
276
+ COMPREPLY=( $( compgen -W '-a -c -d -e -f -m -o -q -r -s -t -x --archive --after --resume --before --cancel --case --delete --editor --finish --flag --force --from --move --menu --not --output --query --remove --section --save_to --search --tag --val --exact' -- $token ) )
277
+
278
+ fi
279
+ }
280
+
281
+ _doing_show() {
282
+ OLD_IFS="$IFS"
283
+ local token=${COMP_WORDS[$COMP_CWORD]}
284
+ IFS=$' '
285
+ local words=$(doing sections)
286
+ IFS="$OLD_IFS"
287
+
288
+ if [[ "$token" == --* ]]; then
289
+ COMPREPLY=( $( compgen -W '--age --after --before --bool --count --case --config_template --duration --from --hilite --interactive --menu --not --output --only_timed --sort --search --times --tag --tag_order --tag_sort --template --totals --val --exact' -- $token ) )
290
+ elif [[ "$token" == -* ]]; then
291
+ COMPREPLY=( $( compgen -W '-a -c -h -i -m -o -s -t -x --age --after --before --bool --count --case --config_template --duration --from --hilite --interactive --menu --not --output --only_timed --sort --search --times --tag --tag_order --tag_sort --template --totals --val --exact' -- $token ) )
292
+ else
293
+ local nocasematchWasOff=0
294
+ shopt nocasematch >/dev/null || nocasematchWasOff=1
295
+ (( nocasematchWasOff )) && shopt -s nocasematch
296
+ local w matches=()
297
+ OLD_IFS="$IFS"
298
+ IFS=$' '‰
299
+ for w in $words; do
300
+ if [[ "$w" == "$token"* ]]; then
301
+ matches+=("${w// / }")
302
+ fi
303
+ done
304
+ IFS="$OLD_IFS"
305
+ (( nocasematchWasOff )) && shopt -u nocasematch
306
+ COMPREPLY=("${matches[@]}")
307
+
308
+ fi
309
+ }
310
+
311
+ _doing_since() {
312
+
313
+ if [[ "$token" == --* ]]; then
314
+ COMPREPLY=( $( compgen -W '--config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
315
+ elif [[ "$token" == -* ]]; then
316
+ COMPREPLY=( $( compgen -W '-o -s -t --config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
317
+
318
+ fi
319
+ }
320
+
321
+ _doing_tag() {
322
+
323
+ if [[ "$token" == --* ]]; then
324
+ COMPREPLY=( $( compgen -W '--autotag --bool --count --case --date --force --interactive --not --remove --regex --rename --section --search --tag --unfinished --value --val --exact' -- $token ) )
325
+ elif [[ "$token" == -* ]]; then
326
+ COMPREPLY=( $( compgen -W '-a -c -d -i -r -s -u -v -x --autotag --bool --count --case --date --force --interactive --not --remove --regex --rename --section --search --tag --unfinished --value --val --exact' -- $token ) )
327
+
328
+ fi
329
+ }
330
+
331
+ _doing_tag_dir() {
332
+
333
+ if [[ "$token" == --* ]]; then
334
+ COMPREPLY=( $( compgen -W '--remove' -- $token ) )
335
+ elif [[ "$token" == -* ]]; then
336
+ COMPREPLY=( $( compgen -W '-r --remove' -- $token ) )
337
+
338
+ fi
339
+ }
340
+
341
+ _doing_tags() {
342
+
343
+ if [[ "$token" == --* ]]; then
344
+ COMPREPLY=( $( compgen -W '--bool --counts --case --interactive --line --not --order --section --search --sort --tag --val --exact' -- $token ) )
345
+ elif [[ "$token" == -* ]]; then
346
+ COMPREPLY=( $( compgen -W '-c -i -l -o -s -x --bool --counts --case --interactive --line --not --order --section --search --sort --tag --val --exact' -- $token ) )
347
+
348
+ fi
349
+ }
350
+
351
+ _doing_template() {
352
+
353
+ if [[ "$token" == --* ]]; then
354
+ COMPREPLY=( $( compgen -W '--column --list --path --save' -- $token ) )
355
+ elif [[ "$token" == -* ]]; then
356
+ COMPREPLY=( $( compgen -W '-c -l -p -s --column --list --path --save' -- $token ) )
357
+
358
+ fi
359
+ }
360
+
361
+ _doing_today() {
362
+
363
+ if [[ "$token" == --* ]]; then
364
+ COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --section --times --tag_sort --template --totals' -- $token ) )
365
+ elif [[ "$token" == -* ]]; then
366
+ COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --section --times --tag_sort --template --totals' -- $token ) )
367
+
368
+ fi
369
+ }
370
+
371
+ _doing_undo() {
372
+
373
+ if [[ "$token" == --* ]]; then
374
+ COMPREPLY=( $( compgen -W '--file --interactive --prune --redo' -- $token ) )
375
+ elif [[ "$token" == -* ]]; then
376
+ COMPREPLY=( $( compgen -W '-f -i -p -r --file --interactive --prune --redo' -- $token ) )
377
+
378
+ fi
379
+ }
380
+
381
+ _doing_view() {
382
+ OLD_IFS="$IFS"
383
+ local token=${COMP_WORDS[$COMP_CWORD]}
384
+ IFS=$' '
385
+ local words=$(doing views)
386
+ IFS="$OLD_IFS"
387
+
388
+ if [[ "$token" == --* ]]; then
389
+ COMPREPLY=( $( compgen -W '--after --age --before --bool --count --case --color --duration --from --hilite --interactive --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --totals --val --exact' -- $token ) )
390
+ elif [[ "$token" == -* ]]; then
391
+ COMPREPLY=( $( compgen -W '-c -h -i -o -s -t -x --after --age --before --bool --count --case --color --duration --from --hilite --interactive --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --totals --val --exact' -- $token ) )
392
+ else
393
+ local nocasematchWasOff=0
394
+ shopt nocasematch >/dev/null || nocasematchWasOff=1
395
+ (( nocasematchWasOff )) && shopt -s nocasematch
396
+ local w matches=()
397
+ OLD_IFS="$IFS"
398
+ IFS=$' '‰
399
+ for w in $words; do
400
+ if [[ "$w" == "$token"* ]]; then
401
+ matches+=("${w// / }")
402
+ fi
403
+ done
404
+ IFS="$OLD_IFS"
405
+ (( nocasematchWasOff )) && shopt -u nocasematch
406
+ COMPREPLY=("${matches[@]}")
407
+
408
+ fi
409
+ }
410
+
411
+ _doing_views() {
412
+
413
+ if [[ "$token" == --* ]]; then
414
+ COMPREPLY=( $( compgen -W '--column' -- $token ) )
415
+ elif [[ "$token" == -* ]]; then
416
+ COMPREPLY=( $( compgen -W '-c --column' -- $token ) )
417
+
418
+ fi
419
+ }
420
+
421
+ _doing_wiki() {
422
+
423
+ if [[ "$token" == --* ]]; then
424
+ COMPREPLY=( $( compgen -W '--after --bool --before --from --only_timed --section --search --tag' -- $token ) )
425
+ elif [[ "$token" == -* ]]; then
426
+ COMPREPLY=( $( compgen -W '-b -f -s --after --bool --before --from --only_timed --section --search --tag' -- $token ) )
427
+
428
+ fi
429
+ }
430
+
431
+ _doing_yesterday() {
432
+
433
+ if [[ "$token" == --* ]]; then
434
+ COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --section --times --tag_order --tag_sort --template --totals' -- $token ) )
435
+ elif [[ "$token" == -* ]]; then
436
+ COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --section --times --tag_order --tag_sort --template --totals' -- $token ) )
437
+
438
+ fi
439
+ }
440
+
441
+ _doing()
442
+ {
443
+ local last="${@: -1}"
444
+ local token=${COMP_WORDS[$COMP_CWORD]}
445
+
446
+ if [[ $last =~ (again|resume) ]]; then _doing_again
447
+ elif [[ $last =~ (archive|move) ]]; then _doing_archive
448
+ elif [[ $last =~ (autotag) ]]; then _doing_autotag
449
+ elif [[ $last =~ (cancel) ]]; then _doing_cancel
450
+ elif [[ $last =~ (changes|changelog) ]]; then _doing_changes
451
+ elif [[ $last =~ (completion) ]]; then _doing_completion
452
+ elif [[ $last =~ (config) ]]; then _doing_config
453
+ elif [[ $last =~ (done|did) ]]; then _doing_done
454
+ elif [[ $last =~ (finish) ]]; then _doing_finish
455
+ elif [[ $last =~ (grep|search) ]]; then _doing_grep
456
+ elif [[ $last =~ (help) ]]; then _doing_help
457
+ elif [[ $last =~ (import) ]]; then _doing_import
458
+ elif [[ $last =~ (last) ]]; then _doing_last
459
+ elif [[ $last =~ (mark|flag) ]]; then _doing_mark
460
+ elif [[ $last =~ (meanwhile) ]]; then _doing_meanwhile
461
+ elif [[ $last =~ (note) ]]; then _doing_note
462
+ elif [[ $last =~ (now|next) ]]; then _doing_now
463
+ elif [[ $last =~ (on) ]]; then _doing_on
464
+ elif [[ $last =~ (open) ]]; then _doing_open
465
+ elif [[ $last =~ (plugins) ]]; then _doing_plugins
466
+ elif [[ $last =~ (recent) ]]; then _doing_recent
467
+ elif [[ $last =~ (redo) ]]; then _doing_redo
468
+ elif [[ $last =~ (reset|begin) ]]; then _doing_reset
469
+ elif [[ $last =~ (rotate) ]]; then _doing_rotate
470
+ elif [[ $last =~ (sections) ]]; then _doing_sections
471
+ elif [[ $last =~ (select) ]]; then _doing_select
472
+ elif [[ $last =~ (show) ]]; then _doing_show
473
+ elif [[ $last =~ (since) ]]; then _doing_since
474
+ elif [[ $last =~ (tag) ]]; then _doing_tag
475
+ elif [[ $last =~ (tag_dir) ]]; then _doing_tag_dir
476
+ elif [[ $last =~ (tags) ]]; then _doing_tags
477
+ elif [[ $last =~ (template) ]]; then _doing_template
478
+ elif [[ $last =~ (today) ]]; then _doing_today
479
+ elif [[ $last =~ (undo) ]]; then _doing_undo
480
+ elif [[ $last =~ (view) ]]; then _doing_view
481
+ elif [[ $last =~ (views) ]]; then _doing_views
482
+ elif [[ $last =~ (wiki) ]]; then _doing_wiki
483
+ elif [[ $last =~ (yesterday) ]]; then _doing_yesterday
484
+ else
485
+ OLD_IFS="$IFS"
486
+ IFS=$'
487
+ '
488
+ COMPREPLY=( $(compgen -W "$(doing help -c)" -- $token) )
489
+ IFS="$OLD_IFS"
490
+ fi
491
+ }
492
+
493
+ complete -F _doing doing
@@ -555,7 +555,8 @@ complete -c doing -l template -f -r -n '__fish_doing_using_command yesterday' -
555
555
  complete -c doing -l totals -f -n '__fish_doing_using_command yesterday' -d Show\ time\ totals\ at\ the\ end\ of\ output
556
556
  complete -f -c doing -s o -l output -x -n '__fish_doing_using_command grep search on select show since today view yesterday' -a '(__fish_doing_export_plugin)'
557
557
  complete -f -c doing -s b -l bool -x -n '__fish_doing_using_command again resume archive move autotag cancel finish grep search last mark flag note reset begin rotate show tag tags view wiki' -a 'and or not pattern'
558
- complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel changes changelog finish grep search import last mark flag note reset begin rotate select show show tag tags tags view' -a 'case-sensitive ignore smart'
558
+ complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel finish grep search import last mark flag note reset begin rotate select show tag tags view' -a 'case-sensitive ignore smart'
559
+ complete -f -c doing -l sort -x -n '__fish_doing_using_command changes changelog show tags' -a 'asc desc'
559
560
  complete -f -c doing -l tag_sort -x -n '__fish_doing_using_command grep search on recent show since today view yesterday' -a 'name time'
560
561
  complete -f -c doing -l tag_order -x -n '__fish_doing_using_command show view yesterday' -a 'asc desc'
561
562
  complete -f -c doing -s a -l age -x -n '__fish_doing_using_command show view' -a 'oldest newest'
@@ -126,7 +126,7 @@ module Doing
126
126
  data = Completion.get_help_sections
127
127
  @global_options = Completion.parse_options(data[:global_options])
128
128
  @commands = Completion.parse_commands(data[:commands])
129
- @bar = TTY::ProgressBar.new("\033[0;0;33mGenerating Bash completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :box, hide_cursor: true, status: 'Reading subcommands')
129
+ @bar = TTY::ProgressBar.new("\033[0;0;33mGenerating Bash completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :square, hide_cursor: true, status: 'Reading subcommands')
130
130
  width = TTY::Screen.columns - 45
131
131
  @bar.resize(width)
132
132
  end
@@ -183,7 +183,7 @@ module Doing
183
183
  need_export.concat(cmd[:commands]) if option[:long] == 'output'
184
184
  need_bool.concat(cmd[:commands]) if option[:long] == 'bool'
185
185
  need_case.concat(cmd[:commands]) if option[:long] == 'case'
186
- need_case.concat(cmd[:commands]) if option[:long] == 'sort'
186
+ need_sort.concat(cmd[:commands]) if option[:long] == 'sort'
187
187
  need_tag_sort.concat(cmd[:commands]) if option[:long] == 'tag_sort'
188
188
  need_tag_order.concat(cmd[:commands]) if option[:long] == 'tag_order'
189
189
  need_age.concat(cmd[:commands]) if option[:long] == 'age'
@@ -232,7 +232,7 @@ module Doing
232
232
  data = Completion.get_help_sections
233
233
  @global_options = Completion.parse_options(data[:global_options])
234
234
  @commands = Completion.parse_commands(data[:commands])
235
- @bar = TTY::ProgressBar.new("\033[0;0;33mGenerating Fish completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :block, hide_cursor: true, status: 'processing subcommands')
235
+ @bar = TTY::ProgressBar.new("\033[0;0;33mGenerating Fish completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :square, hide_cursor: true, status: 'processing subcommands')
236
236
  width = TTY::Screen.columns - 45
237
237
  @bar.resize(width)
238
238
  end
@@ -2,6 +2,12 @@
2
2
 
3
3
  module Doing
4
4
  module Completion
5
+ class ::String
6
+ def sanitize
7
+ gsub(/'/, '\\\'').gsub(/\[/, '(').gsub(/\]/, ')')
8
+ end
9
+ end
10
+
5
11
  # Generate completions for zsh
6
12
  class ZshCompletions
7
13
  attr_accessor :commands, :global_options
@@ -65,12 +71,12 @@ module Doing
65
71
  Completion.parse_options(data[:command_options]).each do |option|
66
72
  next if option.nil?
67
73
 
68
- arg = option[:arg] ? '=' : ''
74
+ arg = option[:arg] ? ":#{option[:arg]}:" : ''
69
75
 
70
76
  option_arr << if option[:short]
71
- %({-#{option[:short]},--#{option[:long]}#{arg}}"[#{option[:description].gsub(/'/, '\\\'')}]")
77
+ %({'(--#{option[:long]})-#{option[:short]}','(-#{option[:short]})--#{option[:long]}'}"[#{option[:description].sanitize}]#{arg}")
72
78
  else
73
- %("(--#{option[:long]}#{arg})--#{option[:long]}#{arg}}[#{option[:description].gsub(/'/, '\\\'')}]")
79
+ %("--#{option[:long]}[#{option[:description].sanitize}]#{arg}")
74
80
  end
75
81
  end
76
82
  end
@@ -87,7 +93,7 @@ module Doing
87
93
  data = Completion.get_help_sections
88
94
  @global_options = Completion.parse_options(data[:global_options])
89
95
  @commands = Completion.parse_commands(data[:commands])
90
- @bar = TTY::ProgressBar.new(" \033[0;0;33mGenerating Zsh completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :block, hide_cursor: true, status: 'processing subcommands')
96
+ @bar = TTY::ProgressBar.new(" \033[0;0;33mGenerating Zsh completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :square, hide_cursor: true, status: 'processing subcommands')
91
97
  width = TTY::Screen.columns - 45
92
98
  @bar.resize(width)
93
99
  end
data/lib/doing/types.rb CHANGED
@@ -11,7 +11,7 @@ module Doing
11
11
  REGEX_TIME = /^#{REGEX_CLOCK}$/i.freeze
12
12
  REGEX_DAY = /^(mon|tue|wed|thur?|fri|sat|sun)(\w+(day)?)?$/i.freeze
13
13
  REGEX_RANGE_INDICATOR = ' +(?:to|through|thru|(?:un)?til|-+) +'
14
- REGEX_RANGE = /^\S+#{REGEX_RANGE_INDICATOR}+\S+/i.freeze
14
+ REGEX_RANGE = /^\S+.*?#{REGEX_RANGE_INDICATOR}\S+.*?$/i.freeze
15
15
  REGEX_TIME_RANGE = /^#{REGEX_CLOCK}#{REGEX_RANGE_INDICATOR}#{REGEX_CLOCK}$/i.freeze
16
16
 
17
17
  InvalidExportType = Class.new(RuntimeError)
data/lib/doing/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '2.1.32'
2
+ VERSION = '2.1.33'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.32
4
+ version: 2.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
@@ -582,6 +582,7 @@ files:
582
582
  - img/doing-show-note-formatting-800.jpg
583
583
  - inputrc
584
584
  - lib/completion/_doing.zsh
585
+ - lib/completion/doing.bash
585
586
  - lib/completion/doing.fish
586
587
  - lib/doing.rb
587
588
  - lib/doing/add_options.rb