doing 2.1.28 → 2.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.irbrc +1 -0
  3. data/CHANGELOG.md +4962 -0
  4. data/Dockerfile-2.6 +3 -1
  5. data/Dockerfile-2.7 +4 -2
  6. data/Dockerfile-3.0 +3 -1
  7. data/Gemfile.lock +2 -67
  8. data/README.md +1 -1
  9. data/bash_profile +13 -0
  10. data/bin/commands/again.rb +1 -1
  11. data/bin/commands/archive.rb +3 -3
  12. data/bin/commands/cancel.rb +1 -1
  13. data/bin/commands/changes.rb +24 -14
  14. data/bin/commands/commands.rb +8 -8
  15. data/bin/commands/completion.rb +61 -19
  16. data/bin/commands/config.rb +20 -17
  17. data/bin/commands/done.rb +1 -1
  18. data/bin/commands/flag.rb +1 -1
  19. data/bin/commands/grep.rb +5 -5
  20. data/bin/commands/last.rb +1 -1
  21. data/bin/commands/meanwhile.rb +1 -1
  22. data/bin/commands/now.rb +1 -1
  23. data/bin/commands/on.rb +1 -1
  24. data/bin/commands/open.rb +4 -4
  25. data/bin/commands/recent.rb +4 -4
  26. data/bin/commands/show.rb +8 -8
  27. data/bin/commands/since.rb +1 -1
  28. data/bin/commands/tag_dir.rb +27 -3
  29. data/bin/commands/today.rb +1 -1
  30. data/bin/commands/view.rb +3 -3
  31. data/bin/commands/yesterday.rb +2 -2
  32. data/bin/doing +26 -135
  33. data/docs/doc/Array.html +1 -1
  34. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  35. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  36. data/docs/doc/BooleanTermParser/Query.html +1 -1
  37. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  38. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  39. data/docs/doc/BooleanTermParser.html +1 -1
  40. data/docs/doc/Doing/Color.html +1 -1
  41. data/docs/doc/Doing/Completion.html +324 -4
  42. data/docs/doc/Doing/Configuration.html +3 -3
  43. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  44. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  45. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  46. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  47. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  48. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  49. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  50. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  51. data/docs/doc/Doing/Errors.html +1 -1
  52. data/docs/doc/Doing/Hooks.html +1 -1
  53. data/docs/doc/Doing/Item.html +125 -1
  54. data/docs/doc/Doing/Items.html +1 -1
  55. data/docs/doc/Doing/LogAdapter.html +1 -1
  56. data/docs/doc/Doing/Note.html +109 -3
  57. data/docs/doc/Doing/Pager.html +1 -1
  58. data/docs/doc/Doing/Plugins.html +1 -1
  59. data/docs/doc/Doing/Prompt.html +1 -1
  60. data/docs/doc/Doing/Section.html +1 -1
  61. data/docs/doc/Doing/TemplateString.html +1 -1
  62. data/docs/doc/Doing/Types.html +1 -1
  63. data/docs/doc/Doing/Util/Backup.html +1 -1
  64. data/docs/doc/Doing/Util.html +1 -1
  65. data/docs/doc/Doing/WWID.html +6 -6
  66. data/docs/doc/Doing.html +2 -2
  67. data/docs/doc/FalseClass.html +1 -1
  68. data/docs/doc/GLI/Commands/Help.html +1 -1
  69. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  70. data/docs/doc/GLI/Commands.html +1 -1
  71. data/docs/doc/GLI.html +1 -1
  72. data/docs/doc/Hash.html +1 -1
  73. data/docs/doc/Object.html +1 -1
  74. data/docs/doc/PhraseParser/Operator.html +1 -1
  75. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  76. data/docs/doc/PhraseParser/Query.html +1 -1
  77. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  78. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  79. data/docs/doc/PhraseParser/TermClause.html +1 -1
  80. data/docs/doc/PhraseParser.html +1 -1
  81. data/docs/doc/Status.html +1 -1
  82. data/docs/doc/String.html +1 -1
  83. data/docs/doc/Symbol.html +1 -1
  84. data/docs/doc/Time.html +1 -1
  85. data/docs/doc/TrueClass.html +1 -1
  86. data/docs/doc/_index.html +3 -1
  87. data/docs/doc/file.README.html +2 -2
  88. data/docs/doc/index.html +2 -2
  89. data/docs/doc/method_list.html +337 -241
  90. data/docs/doc/top-level-namespace.html +105 -1
  91. data/docs/index.md +1 -1
  92. data/doing.gemspec +24 -23
  93. data/doing.rdoc +43 -41
  94. data/example_plugin.rb +7 -5
  95. data/inputrc +57 -0
  96. data/lib/completion/_doing.zsh +4 -8
  97. data/lib/completion/doing.fish +4 -8
  98. data/lib/doing/add_options.rb +117 -0
  99. data/lib/doing/array/array.rb +16 -0
  100. data/lib/doing/changelog/changes.rb +23 -6
  101. data/lib/doing/changelog/version.rb +11 -3
  102. data/lib/doing/completion/bash_completion.rb +12 -51
  103. data/lib/doing/completion/fish_completion.rb +16 -52
  104. data/lib/doing/completion/zsh_completion.rb +12 -51
  105. data/lib/doing/completion.rb +203 -17
  106. data/lib/doing/configuration.rb +12 -6
  107. data/lib/doing/item.rb +21 -3
  108. data/lib/doing/items.rb +5 -5
  109. data/lib/doing/note.rb +24 -8
  110. data/lib/doing/plugins/export/dayone_export.rb +8 -6
  111. data/lib/doing/plugins/export/html_export.rb +4 -4
  112. data/lib/doing/plugins/export/json_export.rb +19 -20
  113. data/lib/doing/plugins/export/markdown_export.rb +2 -2
  114. data/lib/doing/plugins/export/template_export.rb +4 -4
  115. data/lib/doing/plugins/import/calendar_import.rb +1 -1
  116. data/lib/doing/plugins/import/doing_import.rb +1 -1
  117. data/lib/doing/plugins/import/timing_import.rb +1 -1
  118. data/lib/doing/section.rb +1 -1
  119. data/lib/doing/string/highlight.rb +3 -4
  120. data/lib/doing/string/string.rb +8 -0
  121. data/lib/doing/util.rb +1 -1
  122. data/lib/doing/util_backup.rb +12 -12
  123. data/lib/doing/version.rb +1 -1
  124. data/lib/doing/wwid.rb +75 -76
  125. data/lib/doing.rb +58 -0
  126. data/lib/examples/commands/wiki.rb +27 -19
  127. data/lib/helpers/threaded_tests.rb +2 -0
  128. data/scripts/setting_replace.rb +11 -0
  129. metadata +107 -103
  130. data/.yardoc/checksums +0 -29
  131. data/.yardoc/complete +0 -0
  132. data/.yardoc/object_types +0 -0
  133. data/.yardoc/objects/root.dat +0 -0
  134. data/.yardoc/proxy_types +0 -0
  135. data/lib/completion/doing.bash +0 -504
@@ -1,504 +0,0 @@
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 --lookup --markdown --search --sort' -- $token ) )
65
- elif [[ "$token" == -* ]]; then
66
- COMPREPLY=( $( compgen -W '-C -a -l -s --changes --all --lookup --markdown --search --sort' -- $token ) )
67
-
68
- fi
69
- }
70
-
71
- _doing_completion() {
72
-
73
- if [[ "$token" == --* ]]; then
74
- COMPREPLY=( $( compgen -W '--file --type' -- $token ) )
75
- elif [[ "$token" == -* ]]; then
76
- COMPREPLY=( $( compgen -W '-f -t --file --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_later() {
152
-
153
- if [[ "$token" == --* ]]; then
154
- COMPREPLY=( $( compgen -W '--ask --started --editor --note' -- $token ) )
155
- elif [[ "$token" == -* ]]; then
156
- COMPREPLY=( $( compgen -W '-e -n --ask --started --editor --note' -- $token ) )
157
-
158
- fi
159
- }
160
-
161
- _doing_mark() {
162
-
163
- if [[ "$token" == --* ]]; then
164
- COMPREPLY=( $( compgen -W '--bool --count --case --date --force --interactive --not --remove --section --search --tag --unfinished --val --exact' -- $token ) )
165
- elif [[ "$token" == -* ]]; then
166
- 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 ) )
167
-
168
- fi
169
- }
170
-
171
- _doing_meanwhile() {
172
-
173
- if [[ "$token" == --* ]]; then
174
- COMPREPLY=( $( compgen -W '--noauto --archive --ask --started --editor --note --section' -- $token ) )
175
- elif [[ "$token" == -* ]]; then
176
- COMPREPLY=( $( compgen -W '-X -a -e -n -s --noauto --archive --ask --started --editor --note --section' -- $token ) )
177
-
178
- fi
179
- }
180
-
181
- _doing_note() {
182
-
183
- if [[ "$token" == --* ]]; then
184
- COMPREPLY=( $( compgen -W '--ask --bool --case --editor --interactive --not --remove --section --search --tag --val --exact' -- $token ) )
185
- elif [[ "$token" == -* ]]; then
186
- COMPREPLY=( $( compgen -W '-e -i -r -s -x --ask --bool --case --editor --interactive --not --remove --section --search --tag --val --exact' -- $token ) )
187
-
188
- fi
189
- }
190
-
191
- _doing_now() {
192
-
193
- if [[ "$token" == --* ]]; then
194
- COMPREPLY=( $( compgen -W '--noauto --ask --started --editor --finish_last --from --note --section' -- $token ) )
195
- elif [[ "$token" == -* ]]; then
196
- COMPREPLY=( $( compgen -W '-X -e -f -n -s --noauto --ask --started --editor --finish_last --from --note --section' -- $token ) )
197
-
198
- fi
199
- }
200
-
201
- _doing_on() {
202
-
203
- if [[ "$token" == --* ]]; then
204
- COMPREPLY=( $( compgen -W '--config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
205
- elif [[ "$token" == -* ]]; then
206
- COMPREPLY=( $( compgen -W '-o -s -t --config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
207
-
208
- fi
209
- }
210
-
211
- _doing_open() {
212
-
213
- if [[ "$token" == --* ]]; then
214
- COMPREPLY=( $( compgen -W '--app --bundle_id --editor' -- $token ) )
215
- elif [[ "$token" == -* ]]; then
216
- COMPREPLY=( $( compgen -W '-a -b -e --app --bundle_id --editor' -- $token ) )
217
-
218
- fi
219
- }
220
-
221
- _doing_plugins() {
222
-
223
- if [[ "$token" == --* ]]; then
224
- COMPREPLY=( $( compgen -W '--column --type' -- $token ) )
225
- elif [[ "$token" == -* ]]; then
226
- COMPREPLY=( $( compgen -W '-c -t --column --type' -- $token ) )
227
-
228
- fi
229
- }
230
-
231
- _doing_recent() {
232
-
233
- if [[ "$token" == --* ]]; then
234
- COMPREPLY=( $( compgen -W '--config_template --duration --interactive --section --times --tag_sort --template --totals' -- $token ) )
235
- elif [[ "$token" == -* ]]; then
236
- COMPREPLY=( $( compgen -W '-i -s -t --config_template --duration --interactive --section --times --tag_sort --template --totals' -- $token ) )
237
-
238
- fi
239
- }
240
-
241
- _doing_redo() {
242
-
243
- if [[ "$token" == --* ]]; then
244
- COMPREPLY=( $( compgen -W '--file --interactive' -- $token ) )
245
- elif [[ "$token" == -* ]]; then
246
- COMPREPLY=( $( compgen -W '-f -i --file --interactive' -- $token ) )
247
-
248
- fi
249
- }
250
-
251
- _doing_reset() {
252
-
253
- if [[ "$token" == --* ]]; then
254
- COMPREPLY=( $( compgen -W '--bool --case --interactive --not --resume --section --search --tag --val --exact' -- $token ) )
255
- elif [[ "$token" == -* ]]; then
256
- COMPREPLY=( $( compgen -W '-i -r -s -x --bool --case --interactive --not --resume --section --search --tag --val --exact' -- $token ) )
257
-
258
- fi
259
- }
260
-
261
- _doing_rotate() {
262
-
263
- if [[ "$token" == --* ]]; then
264
- COMPREPLY=( $( compgen -W '--before --bool --case --keep --not --section --search --tag --val --exact' -- $token ) )
265
- elif [[ "$token" == -* ]]; then
266
- COMPREPLY=( $( compgen -W '-k -s -x --before --bool --case --keep --not --section --search --tag --val --exact' -- $token ) )
267
-
268
- fi
269
- }
270
-
271
- _doing_sections() {
272
-
273
- if [[ "$token" == --* ]]; then
274
- COMPREPLY=( $( compgen -W '--column' -- $token ) )
275
- elif [[ "$token" == -* ]]; then
276
- COMPREPLY=( $( compgen -W '-c --column' -- $token ) )
277
-
278
- fi
279
- }
280
-
281
- _doing_select() {
282
-
283
- if [[ "$token" == --* ]]; then
284
- 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 ) )
285
- elif [[ "$token" == -* ]]; then
286
- 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 ) )
287
-
288
- fi
289
- }
290
-
291
- _doing_show() {
292
- OLD_IFS="$IFS"
293
- local token=${COMP_WORDS[$COMP_CWORD]}
294
- IFS=$' '
295
- local words=$(doing sections)
296
- IFS="$OLD_IFS"
297
-
298
- if [[ "$token" == --* ]]; then
299
- 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 ) )
300
- elif [[ "$token" == -* ]]; then
301
- 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 ) )
302
- else
303
- local nocasematchWasOff=0
304
- shopt nocasematch >/dev/null || nocasematchWasOff=1
305
- (( nocasematchWasOff )) && shopt -s nocasematch
306
- local w matches=()
307
- OLD_IFS="$IFS"
308
- IFS=$' '‰
309
- for w in $words; do
310
- if [[ "$w" == "$token"* ]]; then
311
- matches+=("${w// / }")
312
- fi
313
- done
314
- IFS="$OLD_IFS"
315
- (( nocasematchWasOff )) && shopt -u nocasematch
316
- COMPREPLY=("${matches[@]}")
317
-
318
- fi
319
- }
320
-
321
- _doing_since() {
322
-
323
- if [[ "$token" == --* ]]; then
324
- COMPREPLY=( $( compgen -W '--config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
325
- elif [[ "$token" == -* ]]; then
326
- COMPREPLY=( $( compgen -W '-o -s -t --config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
327
-
328
- fi
329
- }
330
-
331
- _doing_tag() {
332
-
333
- if [[ "$token" == --* ]]; then
334
- COMPREPLY=( $( compgen -W '--autotag --bool --count --case --date --force --interactive --not --remove --regex --rename --section --search --tag --unfinished --value --val --exact' -- $token ) )
335
- elif [[ "$token" == -* ]]; then
336
- 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 ) )
337
-
338
- fi
339
- }
340
-
341
- _doing_tag_dir() {
342
-
343
- if [[ "$token" == --* ]]; then
344
- COMPREPLY=( $( compgen -W '--remove' -- $token ) )
345
- elif [[ "$token" == -* ]]; then
346
- COMPREPLY=( $( compgen -W '-r --remove' -- $token ) )
347
-
348
- fi
349
- }
350
-
351
- _doing_tags() {
352
-
353
- if [[ "$token" == --* ]]; then
354
- COMPREPLY=( $( compgen -W '--bool --counts --case --interactive --line --not --order --section --search --sort --tag --val --exact' -- $token ) )
355
- elif [[ "$token" == -* ]]; then
356
- COMPREPLY=( $( compgen -W '-c -i -l -o -s -x --bool --counts --case --interactive --line --not --order --section --search --sort --tag --val --exact' -- $token ) )
357
-
358
- fi
359
- }
360
-
361
- _doing_template() {
362
-
363
- if [[ "$token" == --* ]]; then
364
- COMPREPLY=( $( compgen -W '--column --list --path --save' -- $token ) )
365
- elif [[ "$token" == -* ]]; then
366
- COMPREPLY=( $( compgen -W '-c -l -p -s --column --list --path --save' -- $token ) )
367
-
368
- fi
369
- }
370
-
371
- _doing_today() {
372
-
373
- if [[ "$token" == --* ]]; then
374
- COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --section --times --tag_sort --template --totals' -- $token ) )
375
- elif [[ "$token" == -* ]]; then
376
- COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --section --times --tag_sort --template --totals' -- $token ) )
377
-
378
- fi
379
- }
380
-
381
- _doing_undo() {
382
-
383
- if [[ "$token" == --* ]]; then
384
- COMPREPLY=( $( compgen -W '--file --interactive --prune --redo' -- $token ) )
385
- elif [[ "$token" == -* ]]; then
386
- COMPREPLY=( $( compgen -W '-f -i -p -r --file --interactive --prune --redo' -- $token ) )
387
-
388
- fi
389
- }
390
-
391
- _doing_view() {
392
- OLD_IFS="$IFS"
393
- local token=${COMP_WORDS[$COMP_CWORD]}
394
- IFS=$' '
395
- local words=$(doing views)
396
- IFS="$OLD_IFS"
397
-
398
- if [[ "$token" == --* ]]; then
399
- 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 ) )
400
- elif [[ "$token" == -* ]]; then
401
- 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 ) )
402
- else
403
- local nocasematchWasOff=0
404
- shopt nocasematch >/dev/null || nocasematchWasOff=1
405
- (( nocasematchWasOff )) && shopt -s nocasematch
406
- local w matches=()
407
- OLD_IFS="$IFS"
408
- IFS=$' '‰
409
- for w in $words; do
410
- if [[ "$w" == "$token"* ]]; then
411
- matches+=("${w// / }")
412
- fi
413
- done
414
- IFS="$OLD_IFS"
415
- (( nocasematchWasOff )) && shopt -u nocasematch
416
- COMPREPLY=("${matches[@]}")
417
-
418
- fi
419
- }
420
-
421
- _doing_views() {
422
-
423
- if [[ "$token" == --* ]]; then
424
- COMPREPLY=( $( compgen -W '--column' -- $token ) )
425
- elif [[ "$token" == -* ]]; then
426
- COMPREPLY=( $( compgen -W '-c --column' -- $token ) )
427
-
428
- fi
429
- }
430
-
431
- _doing_wiki() {
432
-
433
- if [[ "$token" == --* ]]; then
434
- COMPREPLY=( $( compgen -W '--after --bool --before --from --only_timed --section --search --tag' -- $token ) )
435
- elif [[ "$token" == -* ]]; then
436
- COMPREPLY=( $( compgen -W '-b -f -s --after --bool --before --from --only_timed --section --search --tag' -- $token ) )
437
-
438
- fi
439
- }
440
-
441
- _doing_yesterday() {
442
-
443
- if [[ "$token" == --* ]]; then
444
- COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --section --times --tag_order --tag_sort --template --totals' -- $token ) )
445
- elif [[ "$token" == -* ]]; then
446
- COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --section --times --tag_order --tag_sort --template --totals' -- $token ) )
447
-
448
- fi
449
- }
450
-
451
- _doing()
452
- {
453
- local last="${@: -1}"
454
- local token=${COMP_WORDS[$COMP_CWORD]}
455
-
456
- if [[ $last =~ (again|resume) ]]; then _doing_again
457
- elif [[ $last =~ (archive|move) ]]; then _doing_archive
458
- elif [[ $last =~ (autotag) ]]; then _doing_autotag
459
- elif [[ $last =~ (cancel) ]]; then _doing_cancel
460
- elif [[ $last =~ (changes|changelog) ]]; then _doing_changes
461
- elif [[ $last =~ (completion) ]]; then _doing_completion
462
- elif [[ $last =~ (config) ]]; then _doing_config
463
- elif [[ $last =~ (done|did) ]]; then _doing_done
464
- elif [[ $last =~ (finish) ]]; then _doing_finish
465
- elif [[ $last =~ (grep|search) ]]; then _doing_grep
466
- elif [[ $last =~ (help) ]]; then _doing_help
467
- elif [[ $last =~ (import) ]]; then _doing_import
468
- elif [[ $last =~ (last) ]]; then _doing_last
469
- elif [[ $last =~ (later) ]]; then _doing_later
470
- elif [[ $last =~ (mark|flag) ]]; then _doing_mark
471
- elif [[ $last =~ (meanwhile) ]]; then _doing_meanwhile
472
- elif [[ $last =~ (note) ]]; then _doing_note
473
- elif [[ $last =~ (now|next) ]]; then _doing_now
474
- elif [[ $last =~ (on) ]]; then _doing_on
475
- elif [[ $last =~ (open) ]]; then _doing_open
476
- elif [[ $last =~ (plugins) ]]; then _doing_plugins
477
- elif [[ $last =~ (recent) ]]; then _doing_recent
478
- elif [[ $last =~ (redo) ]]; then _doing_redo
479
- elif [[ $last =~ (reset|begin) ]]; then _doing_reset
480
- elif [[ $last =~ (rotate) ]]; then _doing_rotate
481
- elif [[ $last =~ (sections) ]]; then _doing_sections
482
- elif [[ $last =~ (select) ]]; then _doing_select
483
- elif [[ $last =~ (show) ]]; then _doing_show
484
- elif [[ $last =~ (since) ]]; then _doing_since
485
- elif [[ $last =~ (tag) ]]; then _doing_tag
486
- elif [[ $last =~ (tag_dir) ]]; then _doing_tag_dir
487
- elif [[ $last =~ (tags) ]]; then _doing_tags
488
- elif [[ $last =~ (template) ]]; then _doing_template
489
- elif [[ $last =~ (today) ]]; then _doing_today
490
- elif [[ $last =~ (undo) ]]; then _doing_undo
491
- elif [[ $last =~ (view) ]]; then _doing_view
492
- elif [[ $last =~ (views) ]]; then _doing_views
493
- elif [[ $last =~ (wiki) ]]; then _doing_wiki
494
- elif [[ $last =~ (yesterday) ]]; then _doing_yesterday
495
- else
496
- OLD_IFS="$IFS"
497
- IFS=$'
498
- '
499
- COMPREPLY=( $(compgen -W "$(doing help -c)" -- $token) )
500
- IFS="$OLD_IFS"
501
- fi
502
- }
503
-
504
- complete -F _doing doing