doing 2.1.19 → 2.1.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +19 -16
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +70 -0
  6. data/Gemfile.lock +11 -11
  7. data/README.md +1 -1
  8. data/Rakefile +12 -4
  9. data/bin/doing +297 -234
  10. data/docs/doc/Array.html +7 -30
  11. data/docs/doc/BooleanTermParser/Clause.html +3 -3
  12. data/docs/doc/BooleanTermParser/Operator.html +3 -3
  13. data/docs/doc/BooleanTermParser/Query.html +3 -3
  14. data/docs/doc/BooleanTermParser/QueryParser.html +3 -3
  15. data/docs/doc/BooleanTermParser/QueryTransformer.html +3 -3
  16. data/docs/doc/BooleanTermParser.html +3 -3
  17. data/docs/doc/Doing/Color.html +3 -3
  18. data/docs/doc/Doing/Completion.html +3 -3
  19. data/docs/doc/Doing/Configuration.html +6 -5
  20. data/docs/doc/Doing/Errors/DoingNoTraceError.html +3 -3
  21. data/docs/doc/Doing/Errors/DoingRuntimeError.html +3 -3
  22. data/docs/doc/Doing/Errors/DoingStandardError.html +3 -3
  23. data/docs/doc/Doing/Errors/EmptyInput.html +3 -3
  24. data/docs/doc/Doing/Errors/NoResults.html +3 -3
  25. data/docs/doc/Doing/Errors/PluginException.html +3 -3
  26. data/docs/doc/Doing/Errors/UserCancelled.html +3 -3
  27. data/docs/doc/Doing/Errors/WrongCommand.html +3 -3
  28. data/docs/doc/Doing/Errors.html +3 -3
  29. data/docs/doc/Doing/Hooks.html +3 -3
  30. data/docs/doc/Doing/Item.html +3 -3
  31. data/docs/doc/Doing/Items.html +3 -3
  32. data/docs/doc/Doing/LogAdapter.html +3 -3
  33. data/docs/doc/Doing/Note.html +3 -3
  34. data/docs/doc/Doing/Pager.html +3 -3
  35. data/docs/doc/Doing/Plugins.html +3 -3
  36. data/docs/doc/Doing/Prompt.html +7 -7
  37. data/docs/doc/Doing/Section.html +3 -3
  38. data/docs/doc/Doing/TemplateString.html +4 -4
  39. data/docs/doc/Doing/Types.html +201 -0
  40. data/docs/doc/Doing/Util/Backup.html +3 -3
  41. data/docs/doc/Doing/Util.html +4 -7
  42. data/docs/doc/Doing/WWID.html +66 -8
  43. data/docs/doc/Doing.html +6 -6
  44. data/docs/doc/GLI/Commands/Help.html +185 -0
  45. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +3 -3
  46. data/docs/doc/GLI/Commands.html +7 -5
  47. data/docs/doc/GLI.html +6 -4
  48. data/docs/doc/Hash.html +80 -16
  49. data/docs/doc/Numeric.html +3 -3
  50. data/docs/doc/PhraseParser/Operator.html +3 -3
  51. data/docs/doc/PhraseParser/PhraseClause.html +3 -3
  52. data/docs/doc/PhraseParser/Query.html +3 -3
  53. data/docs/doc/PhraseParser/QueryParser.html +3 -3
  54. data/docs/doc/PhraseParser/QueryTransformer.html +3 -3
  55. data/docs/doc/PhraseParser/TermClause.html +3 -3
  56. data/docs/doc/PhraseParser.html +3 -3
  57. data/docs/doc/Status.html +3 -3
  58. data/docs/doc/String.html +195 -26
  59. data/docs/doc/Symbol.html +3 -3
  60. data/docs/doc/Time.html +3 -3
  61. data/docs/doc/_index.html +22 -8
  62. data/docs/doc/class_list.html +1 -1
  63. data/docs/doc/file.README.html +4 -4
  64. data/docs/doc/frames.html +1 -1
  65. data/docs/doc/index.html +4 -4
  66. data/docs/doc/method_list.html +334 -270
  67. data/docs/doc/top-level-namespace.html +3 -3
  68. data/docs/index.md +1 -1
  69. data/doing.gemspec +1 -1
  70. data/doing.rdoc +173 -15
  71. data/lib/completion/_doing.zsh +20 -20
  72. data/lib/completion/doing.bash +37 -26
  73. data/lib/completion/doing.fish +116 -17
  74. data/lib/doing/array.rb +5 -4
  75. data/lib/doing/array_chronify.rb +4 -3
  76. data/lib/doing/changelog/change.rb +115 -0
  77. data/lib/doing/changelog/changes.rb +73 -0
  78. data/lib/doing/changelog/entry.rb +21 -0
  79. data/lib/doing/changelog/version.rb +97 -0
  80. data/lib/doing/changelog.rb +6 -0
  81. data/lib/doing/completion/fish_completion.rb +82 -12
  82. data/lib/doing/configuration.rb +17 -8
  83. data/lib/doing/hash.rb +25 -6
  84. data/lib/doing/help_monkey_patch.rb +31 -0
  85. data/lib/doing/hooks.rb +5 -1
  86. data/lib/doing/item.rb +10 -25
  87. data/lib/doing/items.rb +3 -1
  88. data/lib/doing/log_adapter.rb +1 -1
  89. data/lib/doing/pager.rb +2 -2
  90. data/lib/doing/plugins/export/dayone_export.rb +1 -1
  91. data/lib/doing/plugins/export/markdown_export.rb +1 -1
  92. data/lib/doing/plugins/export/template_export.rb +9 -3
  93. data/lib/doing/prompt.rb +4 -2
  94. data/lib/doing/string.rb +40 -11
  95. data/lib/doing/string_chronify.rb +56 -18
  96. data/lib/doing/template_string.rb +7 -0
  97. data/lib/doing/types.rb +25 -0
  98. data/lib/doing/util.rb +2 -1
  99. data/lib/doing/version.rb +1 -1
  100. data/lib/doing/wwid.rb +91 -67
  101. data/lib/doing.rb +2 -0
  102. data/lib/examples/commands/later.rb +32 -0
  103. data/lib/helpers/threaded_tests.rb +286 -0
  104. metadata +17 -6
@@ -1,9 +1,9 @@
1
1
  _doing_again() {
2
2
 
3
3
  if [[ "$token" == --* ]]; then
4
- COMPREPLY=( $( compgen -W '--ask --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
4
+ COMPREPLY=( $( compgen -W '--ask --started --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
5
5
  elif [[ "$token" == -* ]]; then
6
- COMPREPLY=( $( compgen -W '-e -i -n -s -x --ask --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
6
+ COMPREPLY=( $( compgen -W '-e -i -n -s -x --ask --started --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
7
7
 
8
8
  fi
9
9
  }
@@ -58,6 +58,16 @@ _doing_cancel() {
58
58
  fi
59
59
  }
60
60
 
61
+ _doing_changes() {
62
+
63
+ if [[ "$token" == --* ]]; then
64
+ COMPREPLY=( $( compgen -W '--all --lookup --search' -- $token ) )
65
+ elif [[ "$token" == -* ]]; then
66
+ COMPREPLY=( $( compgen -W '-a -l -s --all --lookup --search' -- $token ) )
67
+
68
+ fi
69
+ }
70
+
61
71
  _doing_completion() {
62
72
 
63
73
  if [[ "$token" == --* ]]; then
@@ -91,9 +101,9 @@ _doing_done() {
91
101
  _doing_finish() {
92
102
 
93
103
  if [[ "$token" == --* ]]; then
94
- COMPREPLY=( $( compgen -W '--archive --at --auto --back --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --val --exact' -- $token ) )
104
+ COMPREPLY=( $( compgen -W '--archive --finished --auto --started --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --val --exact' -- $token ) )
95
105
  elif [[ "$token" == -* ]]; then
96
- COMPREPLY=( $( compgen -W '-a -b -i -r -s -u -x --archive --at --auto --back --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --val --exact' -- $token ) )
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 --val --exact' -- $token ) )
97
107
 
98
108
  fi
99
109
  }
@@ -101,9 +111,9 @@ _doing_finish() {
101
111
  _doing_grep() {
102
112
 
103
113
  if [[ "$token" == --* ]]; then
104
- COMPREPLY=( $( compgen -W '--after --before --bool --case --delete --duration --editor --from --hilite --interactive --not --output --only_timed --section --times --tag_sort --totals --val --exact' -- $token ) )
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 ) )
105
115
  elif [[ "$token" == -* ]]; then
106
- COMPREPLY=( $( compgen -W '-d -e -h -i -o -s -t -x --after --before --bool --case --delete --duration --editor --from --hilite --interactive --not --output --only_timed --section --times --tag_sort --totals --val --exact' -- $token ) )
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 ) )
107
117
 
108
118
  fi
109
119
  }
@@ -131,9 +141,9 @@ _doing_import() {
131
141
  _doing_last() {
132
142
 
133
143
  if [[ "$token" == --* ]]; then
134
- COMPREPLY=( $( compgen -W '--bool --case --delete --duration --editor --hilite --not --section --search --tag --val --exact' -- $token ) )
144
+ COMPREPLY=( $( compgen -W '--bool --case --config_template --delete --duration --editor --hilite --not --section --search --tag --template --val --exact' -- $token ) )
135
145
  elif [[ "$token" == -* ]]; then
136
- COMPREPLY=( $( compgen -W '-d -e -h -s -x --bool --case --delete --duration --editor --hilite --not --section --search --tag --val --exact' -- $token ) )
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 ) )
137
147
 
138
148
  fi
139
149
  }
@@ -141,9 +151,9 @@ _doing_last() {
141
151
  _doing_later() {
142
152
 
143
153
  if [[ "$token" == --* ]]; then
144
- COMPREPLY=( $( compgen -W '--ask --back --editor --note' -- $token ) )
154
+ COMPREPLY=( $( compgen -W '--ask --started --editor --note' -- $token ) )
145
155
  elif [[ "$token" == -* ]]; then
146
- COMPREPLY=( $( compgen -W '-b -e -n --ask --back --editor --note' -- $token ) )
156
+ COMPREPLY=( $( compgen -W '-e -n --ask --started --editor --note' -- $token ) )
147
157
 
148
158
  fi
149
159
  }
@@ -161,9 +171,9 @@ _doing_mark() {
161
171
  _doing_meanwhile() {
162
172
 
163
173
  if [[ "$token" == --* ]]; then
164
- COMPREPLY=( $( compgen -W '--archive --ask --back --editor --note --section' -- $token ) )
174
+ COMPREPLY=( $( compgen -W '--archive --ask --started --editor --note --section' -- $token ) )
165
175
  elif [[ "$token" == -* ]]; then
166
- COMPREPLY=( $( compgen -W '-a -b -e -n -s --archive --ask --back --editor --note --section' -- $token ) )
176
+ COMPREPLY=( $( compgen -W '-a -e -n -s --archive --ask --started --editor --note --section' -- $token ) )
167
177
 
168
178
  fi
169
179
  }
@@ -191,9 +201,9 @@ _doing_now() {
191
201
  _doing_on() {
192
202
 
193
203
  if [[ "$token" == --* ]]; then
194
- COMPREPLY=( $( compgen -W '--duration --output --section --times --tag_sort --totals' -- $token ) )
204
+ COMPREPLY=( $( compgen -W '--config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
195
205
  elif [[ "$token" == -* ]]; then
196
- COMPREPLY=( $( compgen -W '-o -s -t --duration --output --section --times --tag_sort --totals' -- $token ) )
206
+ COMPREPLY=( $( compgen -W '-o -s -t --config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
197
207
 
198
208
  fi
199
209
  }
@@ -221,9 +231,9 @@ _doing_plugins() {
221
231
  _doing_recent() {
222
232
 
223
233
  if [[ "$token" == --* ]]; then
224
- COMPREPLY=( $( compgen -W '--duration --interactive --section --times --tag_sort --totals' -- $token ) )
234
+ COMPREPLY=( $( compgen -W '--config_template --duration --interactive --section --times --tag_sort --template --totals' -- $token ) )
225
235
  elif [[ "$token" == -* ]]; then
226
- COMPREPLY=( $( compgen -W '-i -s -t --duration --interactive --section --times --tag_sort --totals' -- $token ) )
236
+ COMPREPLY=( $( compgen -W '-i -s -t --config_template --duration --interactive --section --times --tag_sort --template --totals' -- $token ) )
227
237
 
228
238
  fi
229
239
  }
@@ -276,9 +286,9 @@ local words=$(doing sections)
276
286
  IFS="$OLD_IFS"
277
287
 
278
288
  if [[ "$token" == --* ]]; then
279
- COMPREPLY=( $( compgen -W '--age --after --bool --before --count --case --duration --from --hilite --interactive --menu --not --output --only_timed --sort --search --times --tag --tag_order --tag_sort --totals --val --exact' -- $token ) )
289
+ COMPREPLY=( $( compgen -W '--age --after --bool --before --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 ) )
280
290
  elif [[ "$token" == -* ]]; then
281
- COMPREPLY=( $( compgen -W '-a -b -c -h -i -m -o -s -t -x --age --after --bool --before --count --case --duration --from --hilite --interactive --menu --not --output --only_timed --sort --search --times --tag --tag_order --tag_sort --totals --val --exact' -- $token ) )
291
+ COMPREPLY=( $( compgen -W '-a -b -c -h -i -m -o -s -t -x --age --after --bool --before --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 ) )
282
292
  else
283
293
  local nocasematchWasOff=0
284
294
  shopt nocasematch >/dev/null || nocasematchWasOff=1
@@ -301,9 +311,9 @@ IFS="$OLD_IFS"
301
311
  _doing_since() {
302
312
 
303
313
  if [[ "$token" == --* ]]; then
304
- COMPREPLY=( $( compgen -W '--duration --output --section --times --tag_sort --totals' -- $token ) )
314
+ COMPREPLY=( $( compgen -W '--config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
305
315
  elif [[ "$token" == -* ]]; then
306
- COMPREPLY=( $( compgen -W '-o -s -t --duration --output --section --times --tag_sort --totals' -- $token ) )
316
+ COMPREPLY=( $( compgen -W '-o -s -t --config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
307
317
 
308
318
  fi
309
319
  }
@@ -331,9 +341,9 @@ _doing_tag_dir() {
331
341
  _doing_tags() {
332
342
 
333
343
  if [[ "$token" == --* ]]; then
334
- COMPREPLY=( $( compgen -W '--bool --counts --case --interactive --not --order --section --search --sort --tag --val --exact' -- $token ) )
344
+ COMPREPLY=( $( compgen -W '--bool --counts --case --interactive --line --not --order --section --search --sort --tag --val --exact' -- $token ) )
335
345
  elif [[ "$token" == -* ]]; then
336
- COMPREPLY=( $( compgen -W '-c -i -o -s -x --bool --counts --case --interactive --not --order --section --search --sort --tag --val --exact' -- $token ) )
346
+ COMPREPLY=( $( compgen -W '-c -i -l -o -s -x --bool --counts --case --interactive --line --not --order --section --search --sort --tag --val --exact' -- $token ) )
337
347
 
338
348
  fi
339
349
  }
@@ -351,9 +361,9 @@ _doing_template() {
351
361
  _doing_today() {
352
362
 
353
363
  if [[ "$token" == --* ]]; then
354
- COMPREPLY=( $( compgen -W '--after --before --duration --from --output --section --times --tag_sort --totals' -- $token ) )
364
+ COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --section --times --tag_sort --template --totals' -- $token ) )
355
365
  elif [[ "$token" == -* ]]; then
356
- COMPREPLY=( $( compgen -W '-o -s -t --after --before --duration --from --output --section --times --tag_sort --totals' -- $token ) )
366
+ COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --section --times --tag_sort --template --totals' -- $token ) )
357
367
 
358
368
  fi
359
369
  }
@@ -421,9 +431,9 @@ _doing_wiki() {
421
431
  _doing_yesterday() {
422
432
 
423
433
  if [[ "$token" == --* ]]; then
424
- COMPREPLY=( $( compgen -W '--after --before --duration --from --output --section --times --tag_order --tag_sort --totals' -- $token ) )
434
+ COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --section --times --tag_order --tag_sort --template --totals' -- $token ) )
425
435
  elif [[ "$token" == -* ]]; then
426
- COMPREPLY=( $( compgen -W '-o -s -t --after --before --duration --from --output --section --times --tag_order --tag_sort --totals' -- $token ) )
436
+ COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --section --times --tag_order --tag_sort --template --totals' -- $token ) )
427
437
 
428
438
  fi
429
439
  }
@@ -437,6 +447,7 @@ _doing()
437
447
  elif [[ $last =~ (archive|move) ]]; then _doing_archive
438
448
  elif [[ $last =~ (autotag) ]]; then _doing_autotag
439
449
  elif [[ $last =~ (cancel) ]]; then _doing_cancel
450
+ elif [[ $last =~ (changes|changelog) ]]; then _doing_changes
440
451
  elif [[ $last =~ (completion) ]]; then _doing_completion
441
452
  elif [[ $last =~ (config) ]]; then _doing_config
442
453
  elif [[ $last =~ (done|did) ]]; then _doing_done
@@ -23,28 +23,97 @@ function __fish_doing_using_command
23
23
  and return 0
24
24
  end
25
25
 
26
+ function __fish_doing_cache_timer_expired
27
+ set -l timer __fish_doing_cache_timer_$argv[1]
28
+ if not set -q $timer
29
+ set -g $timer (date '+%s')
30
+ end
31
+
32
+ if test (math (date '+%s') - $$timer) -gt $argv[2]
33
+ set -g $timer (date '+%s')
34
+ return 1
35
+ end
36
+
37
+ return 0
38
+ end
39
+
40
+ function __fish_doing_subcommands
41
+ if not set -q __fish_doing_subcommands_cache
42
+ or __fish_doing_cache_timer_expired subcommands 86400
43
+ set -g -a __fish_doing_subcommands_cache (doing help -c)
44
+ end
45
+ printf '%s
46
+ ' $__fish_doing_subcommands_cache
47
+ end
48
+
26
49
  function __fish_doing_complete_sections
27
- doing sections -c
50
+ if not set -q __fish_doing_sections_cache
51
+ or __fish_doing_cache_timer_expired sections 3600
52
+ set -g -a __fish_doing_sections_cache (doing sections -c)
53
+ end
54
+ printf '%s
55
+ ' $__fish_doing_sections_cache
56
+ __fish_doing_complete_show_tag
28
57
  end
29
58
 
30
59
  function __fish_doing_complete_views
31
- doing views -c
60
+ if not set -q __fish_doing_views_cache
61
+ or __fish_doing_cache_timer_expired views 3600
62
+ set -g -a __fish_doing_views_cache (doing views -c)
63
+ end
64
+ printf '%s
65
+ ' $__fish_doing_views_cache
32
66
  end
33
67
 
34
- function __fish_doing_subcommands
35
- doing help -c
68
+ function __fish_doing_export_plugin
69
+ if not set -q __fish_doing_export_plugin_cache
70
+ or __fish_doing_cache_timer_expired export_plugins 3600
71
+ set -g -a __fish_doing_export_plugin_cache (doing plugins --type export -c)
72
+ end
73
+ printf '%s
74
+ ' $__fish_doing_export_plugin_cache
75
+ end
76
+
77
+ function __fish_doing_import_plugin
78
+ if not set -q __fish_doing_import_plugin_cache
79
+ or __fish_doing_cache_timer_expired import_plugins 3600
80
+ set -g -a __fish_doing_import_plugin_cache (doing plugins --type import -c)
81
+ end
82
+ printf '%s
83
+ ' $__fish_doing_import_plugin_cache
84
+ end
85
+
86
+ function __fish_doing_complete_template
87
+ if not set -q __fish_doing_template_cache
88
+ or __fish_doing_cache_timer_expired template 3600
89
+ set -g -a __fish_doing_template_cache (doing template -c)
90
+ end
91
+ printf '%s
92
+ ' $__fish_doing_template_cache
36
93
  end
37
94
 
38
- function __fish_doing_export_plugins
39
- doing plugins --type export -c
95
+ function __fish_doing_complete_tag
96
+ if not set -q __fish_doing_tag_cache
97
+ or __fish_doing_cache_timer_expired tags 60
98
+ set -g -a __fish_doing_tag_cache (doing tags)
99
+ end
100
+ printf '%s
101
+ ' $__fish_doing_tag_cache
40
102
  end
41
103
 
42
- function __fish_doing_import_plugins
43
- doing plugins --type import -c
104
+ function __fish_doing_complete_show_tag
105
+ if not set -q __fish_doing_tag_cache
106
+ or __fish_doing_cache_timer_expired tags 60
107
+ set -g -a __fish_doing_tag_cache (doing tags)
108
+ end
109
+ printf '@%s
110
+ ' $__fish_doing_tag_cache
44
111
  end
45
112
 
46
- function __fish_doing_complete_templates
47
- doing template -c
113
+ function __fish_doing_complete_args
114
+ for cmd in (doing commands_accepting -c $argv[1])
115
+ complete -x -c doing -l $argv[1] -n "__fish_doing_using_command $cmd" -a "(__fish_doing_complete_$argv[1])"
116
+ end
48
117
  end
49
118
 
50
119
  complete -c doing -f
@@ -54,15 +123,24 @@ complete -f -c doing -n '__fish_doing_using_command show' -a '(__fish_doing_comp
54
123
  complete -f -c doing -n '__fish_doing_using_command view' -a '(__fish_doing_complete_views)'
55
124
  complete -f -c doing -n '__fish_doing_using_command template' -a '(__fish_doing_complete_templates)'
56
125
  complete -f -c doing -s t -l type -x -n '__fish_doing_using_command import' -a '(__fish_doing_import_plugins)'
126
+ complete -f -c doing -n '__fish_doing_using_command help' -a '(__fish_doing_subcommands)'
127
+
128
+ # complete -xc doing -n '__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from (doing help -c)' -a "(doing help -c)"
129
+
130
+ function __fish_doing_complete_args
131
+ for cmd in (doing commands_accepting -c $argv[1])
132
+ complete -x -c doing -l $argv[1] -n "__fish_doing_using_command $cmd" -a "(__fish_doing_complete_$argv[1])"
133
+ end
134
+ end
57
135
 
58
- complete -xc doing -n '__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from (doing help -c)' -a "(doing help -c)"
136
+ __fish_doing_complete_args tag
59
137
 
60
138
  complete -xc doing -n '__fish_doing_needs_command' -a 'add_section' -d Add\ a\ new\ section\ to\ the\ \"doing\"\ file
61
139
  complete -xc doing -n '__fish_doing_needs_command' -a 'again resume' -d Repeat\ last\ entry\ as\ new\ entry
62
140
  complete -xc doing -n '__fish_doing_needs_command' -a 'archive move' -d Move\ entries\ between\ sections
63
141
  complete -xc doing -n '__fish_doing_needs_command' -a 'autotag' -d Autotag\ last\ entry\ or\ filtered\ entries
64
142
  complete -xc doing -n '__fish_doing_needs_command' -a 'cancel' -d End\ last\ X\ entries\ with\ no\ time\ tracked
65
- complete -xc doing -n '__fish_doing_needs_command' -a 'changelog changes' -d List\ recent\ changes\ in\ Doing
143
+ complete -xc doing -n '__fish_doing_needs_command' -a 'changes changelog' -d List\ recent\ changes\ in\ Doing
66
144
  complete -xc doing -n '__fish_doing_needs_command' -a 'choose' -d Select\ a\ section\ to\ display\ from\ a\ menu
67
145
  complete -xc doing -n '__fish_doing_needs_command' -a 'colors' -d List\ available\ color\ variables\ for\ configuration\ templates\ and\ views
68
146
  complete -xc doing -n '__fish_doing_needs_command' -a 'completion' -d Generate\ shell\ completion\ scripts
@@ -100,6 +178,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'views' -d List\ available
100
178
  complete -xc doing -n '__fish_doing_needs_command' -a 'wiki' -d Output\ a\ tag\ wiki
101
179
  complete -xc doing -n '__fish_doing_needs_command' -a 'yesterday' -d List\ entries\ from\ yesterday
102
180
  complete -c doing -l ask -f -n '__fish_doing_using_command again resume' -d Prompt\ for\ note\ via\ multi-line\ input
181
+ complete -c doing -l started -f -r -n '__fish_doing_using_command again resume' -d Backdate\ start\ date\ by\ interval\ or\ set\ to\ time\ \[4pm\|20m\|2h\|\"yesterday\ noon\"\]
103
182
  complete -c doing -l bool -f -r -n '__fish_doing_using_command again resume' -d Boolean\ used\ to\ combine\ multiple\ tags
104
183
  complete -c doing -l case -f -r -n '__fish_doing_using_command again resume' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
105
184
  complete -c doing -l editor -s e -f -n '__fish_doing_using_command again resume' -d Edit\ duplicated\ entry\ with\ vim\ before\ adding
@@ -142,6 +221,9 @@ complete -c doing -l tag -f -r -n '__fish_doing_using_command cancel' -d Cancel
142
221
  complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command cancel' -d Cancel\ last\ entry
143
222
  complete -c doing -l val -f -r -n '__fish_doing_using_command cancel' -d Perform\ a\ tag\ value\ query
144
223
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command cancel' -d Force\ exact\ search\ string\ matching
224
+ complete -c doing -l all -s a -f -n '__fish_doing_using_command changes changelog' -d Display\ all\ versions
225
+ complete -c doing -l lookup -s l -f -r -n '__fish_doing_using_command changes changelog' -d Look\ up\ a\ specific\ version
226
+ complete -c doing -l search -s s -f -r -n '__fish_doing_using_command changes changelog' -d Show\ changelogs\ matching\ search\ terms
145
227
  complete -c doing -l file -s f -f -r -n '__fish_doing_using_command completion' -d File\ to\ write\ output\ to
146
228
  complete -c doing -l type -s t -f -r -n '__fish_doing_using_command completion' -d Shell\ to\ generate\ for
147
229
  complete -c doing -l dump -s d -f -n '__fish_doing_using_command config' -d DEPRECATED
@@ -159,9 +241,9 @@ complete -c doing -l section -s s -f -r -n '__fish_doing_using_command done did'
159
241
  complete -c doing -l for -f -r -n '__fish_doing_using_command done did' -d Set\ completion\ date\ to\ start\ date\ plus\ interval
160
242
  complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command done did' -d Finish\ last\ entry\ not\ already\ marked\ @done
161
243
  complete -c doing -l archive -s a -f -n '__fish_doing_using_command finish' -d Archive\ entries
162
- complete -c doing -l at -f -r -n '__fish_doing_using_command finish' -d Set\ finish\ date\ to\ specific\ date/time
244
+ complete -c doing -l finished -f -r -n '__fish_doing_using_command finish' -d Set\ finish\ date\ to\ specific\ date/time
163
245
  complete -c doing -l auto -f -n '__fish_doing_using_command finish' -d Auto-generate\ finish\ dates\ from\ next\ entry\'s\ start\ time
164
- complete -c doing -l back -s b -f -r -n '__fish_doing_using_command finish' -d Backdate\ completed\ date\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
246
+ complete -c doing -l started -f -r -n '__fish_doing_using_command finish' -d Backdate\ completed\ date\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
165
247
  complete -c doing -l bool -f -r -n '__fish_doing_using_command finish' -d Boolean
166
248
  complete -c doing -l case -f -r -n '__fish_doing_using_command finish' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
167
249
  complete -c doing -l date -f -n '__fish_doing_using_command finish' -d Include\ date
@@ -179,6 +261,7 @@ complete -c doing -l after -f -r -n '__fish_doing_using_command grep search' -d
179
261
  complete -c doing -l before -f -r -n '__fish_doing_using_command grep search' -d Search\ entries\ older\ than\ date
180
262
  complete -c doing -l bool -f -r -n '__fish_doing_using_command grep search' -d Combine\ multiple\ tags\ or\ value\ queries\ using\ AND
181
263
  complete -c doing -l case -f -r -n '__fish_doing_using_command grep search' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
264
+ complete -c doing -l config_template -f -r -n '__fish_doing_using_command grep search' -d Output\ using\ a\ template\ from\ configuration
182
265
  complete -c doing -l delete -s d -f -n '__fish_doing_using_command grep search' -d Delete\ matching\ entries
183
266
  complete -c doing -l duration -f -n '__fish_doing_using_command grep search' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
184
267
  complete -c doing -l editor -s e -f -n '__fish_doing_using_command grep search' -d Edit\ matching\ entries\ with\ vim
@@ -191,6 +274,7 @@ complete -c doing -l only_timed -f -n '__fish_doing_using_command grep search'
191
274
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command grep search' -d Section
192
275
  complete -c doing -l times -s t -f -n '__fish_doing_using_command grep search' -d Show\ time\ intervals\ on\ @done\ tasks
193
276
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command grep search' -d Sort\ tags\ by
277
+ complete -c doing -l template -f -r -n '__fish_doing_using_command grep search' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
194
278
  complete -c doing -l totals -f -n '__fish_doing_using_command grep search' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
195
279
  complete -c doing -l val -f -r -n '__fish_doing_using_command grep search' -d Perform\ a\ tag\ value\ query
196
280
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command grep search' -d Force\ exact\ string\ matching
@@ -211,6 +295,7 @@ complete -c doing -l type -f -r -n '__fish_doing_using_command import' -d Impor
211
295
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command import' -d Force\ exact\ search\ string\ matching
212
296
  complete -c doing -l bool -f -r -n '__fish_doing_using_command last' -d Tag\ boolean
213
297
  complete -c doing -l case -f -r -n '__fish_doing_using_command last' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
298
+ complete -c doing -l config_template -f -r -n '__fish_doing_using_command last' -d Output\ using\ a\ template\ from\ configuration
214
299
  complete -c doing -l delete -s d -f -n '__fish_doing_using_command last' -d Delete\ the\ last\ entry
215
300
  complete -c doing -l duration -f -n '__fish_doing_using_command last' -d Show\ elapsed\ time\ if\ entry\ is\ not\ tagged\ @done
216
301
  complete -c doing -l editor -s e -f -n '__fish_doing_using_command last' -d Edit\ entry\ with\ vim
@@ -219,10 +304,11 @@ complete -c doing -l not -f -n '__fish_doing_using_command last' -d Show\ item
219
304
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command last' -d Specify\ a\ section
220
305
  complete -c doing -l search -f -r -n '__fish_doing_using_command last' -d Search\ filter
221
306
  complete -c doing -l tag -f -r -n '__fish_doing_using_command last' -d Tag\ filter
307
+ complete -c doing -l template -f -r -n '__fish_doing_using_command last' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
222
308
  complete -c doing -l val -f -r -n '__fish_doing_using_command last' -d Perform\ a\ tag\ value\ query
223
309
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command last' -d Force\ exact\ search\ string\ matching
224
310
  complete -c doing -l ask -f -n '__fish_doing_using_command later' -d Prompt\ for\ note\ via\ multi-line\ input
225
- complete -c doing -l back -s b -f -r -n '__fish_doing_using_command later' -d Backdate\ start\ time\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
311
+ complete -c doing -l started -f -r -n '__fish_doing_using_command later' -d Backdate\ start\ time\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
226
312
  complete -c doing -l editor -s e -f -n '__fish_doing_using_command later' -d Edit\ entry\ with\ vim
227
313
  complete -c doing -l note -s n -f -r -n '__fish_doing_using_command later' -d Note
228
314
  complete -c doing -l bool -f -r -n '__fish_doing_using_command mark flag' -d Boolean
@@ -241,7 +327,7 @@ complete -c doing -l val -f -r -n '__fish_doing_using_command mark flag' -d Per
241
327
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command mark flag' -d Force\ exact\ search\ string\ matching
242
328
  complete -c doing -l archive -s a -f -n '__fish_doing_using_command meanwhile' -d Archive\ previous\ @meanwhile\ entry
243
329
  complete -c doing -l ask -f -n '__fish_doing_using_command meanwhile' -d Prompt\ for\ note\ via\ multi-line\ input
244
- complete -c doing -l back -s b -f -r -n '__fish_doing_using_command meanwhile' -d Backdate\ start\ date\ for\ new\ entry\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
330
+ complete -c doing -l started -f -r -n '__fish_doing_using_command meanwhile' -d Backdate\ start\ date\ for\ new\ entry\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
245
331
  complete -c doing -l editor -s e -f -n '__fish_doing_using_command meanwhile' -d Edit\ entry\ with\ vim
246
332
  complete -c doing -l note -s n -f -r -n '__fish_doing_using_command meanwhile' -d Note
247
333
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command meanwhile' -d Section
@@ -263,22 +349,26 @@ complete -c doing -l editor -s e -f -n '__fish_doing_using_command now next' -d
263
349
  complete -c doing -l finish_last -s f -f -n '__fish_doing_using_command now next' -d Timed\ entry
264
350
  complete -c doing -l note -s n -f -r -n '__fish_doing_using_command now next' -d Include\ a\ note
265
351
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command now next' -d Section
352
+ complete -c doing -l config_template -f -r -n '__fish_doing_using_command on' -d Output\ using\ a\ template\ from\ configuration
266
353
  complete -c doing -l duration -f -n '__fish_doing_using_command on' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
267
354
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command on' -d Output\ to\ export\ format
268
355
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command on' -d Section
269
356
  complete -c doing -l times -s t -f -n '__fish_doing_using_command on' -d Show\ time\ intervals\ on\ @done\ tasks
270
357
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command on' -d Sort\ tags\ by
358
+ complete -c doing -l template -f -r -n '__fish_doing_using_command on' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
271
359
  complete -c doing -l totals -f -n '__fish_doing_using_command on' -d Show\ time\ totals\ at\ the\ end\ of\ output
272
360
  complete -c doing -l app -s a -f -r -n '__fish_doing_using_command open' -d Open\ with\ app\ name
273
361
  complete -c doing -l bundle_id -s b -f -r -n '__fish_doing_using_command open' -d Open\ with\ app\ bundle\ id
274
362
  complete -c doing -l editor -s e -f -r -n '__fish_doing_using_command open' -d Open\ with\ editor\ command
275
363
  complete -c doing -l column -s c -f -n '__fish_doing_using_command plugins' -d List\ in\ single\ column\ for\ completion
276
364
  complete -c doing -l type -s t -f -r -n '__fish_doing_using_command plugins' -d List\ plugins\ of\ type
365
+ complete -c doing -l config_template -f -r -n '__fish_doing_using_command recent' -d Output\ using\ a\ template\ from\ configuration
277
366
  complete -c doing -l duration -f -n '__fish_doing_using_command recent' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
278
367
  complete -c doing -l interactive -s i -f -n '__fish_doing_using_command recent' -d Select\ from\ a\ menu\ of\ matching\ entries\ to\ perform\ additional\ operations
279
368
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command recent' -d Section
280
369
  complete -c doing -l times -s t -f -n '__fish_doing_using_command recent' -d Show\ time\ intervals\ on\ @done\ tasks
281
370
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command recent' -d Sort\ tags\ by
371
+ complete -c doing -l template -f -r -n '__fish_doing_using_command recent' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
282
372
  complete -c doing -l totals -f -n '__fish_doing_using_command recent' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
283
373
  complete -c doing -l bool -f -r -n '__fish_doing_using_command reset begin' -d Boolean
284
374
  complete -c doing -l case -f -r -n '__fish_doing_using_command reset begin' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
@@ -331,6 +421,7 @@ complete -c doing -l bool -s b -f -r -n '__fish_doing_using_command show' -d Tag
331
421
  complete -c doing -l before -f -r -n '__fish_doing_using_command show' -d Show\ entries\ older\ than\ date
332
422
  complete -c doing -l count -s c -f -r -n '__fish_doing_using_command show' -d Max\ count\ to\ show
333
423
  complete -c doing -l case -f -r -n '__fish_doing_using_command show' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
424
+ complete -c doing -l config_template -f -r -n '__fish_doing_using_command show' -d Output\ using\ a\ template\ from\ configuration
334
425
  complete -c doing -l duration -f -n '__fish_doing_using_command show' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
335
426
  complete -c doing -l from -f -r -n '__fish_doing_using_command show' -d Date\ range\ to\ show
336
427
  complete -c doing -l hilite -s h -f -n '__fish_doing_using_command show' -d Highlight\ search\ matches\ in\ output
@@ -345,14 +436,17 @@ complete -c doing -l times -s t -f -n '__fish_doing_using_command show' -d Show
345
436
  complete -c doing -l tag -f -r -n '__fish_doing_using_command show' -d Tag\ filter
346
437
  complete -c doing -l tag_order -f -r -n '__fish_doing_using_command show' -d Tag\ sort\ direction
347
438
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command show' -d Sort\ tags\ by
439
+ complete -c doing -l template -f -r -n '__fish_doing_using_command show' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
348
440
  complete -c doing -l totals -f -n '__fish_doing_using_command show' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
349
441
  complete -c doing -l val -f -r -n '__fish_doing_using_command show' -d Perform\ a\ tag\ value\ query
350
442
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command show' -d Force\ exact\ search\ string\ matching
443
+ complete -c doing -l config_template -f -r -n '__fish_doing_using_command since' -d Output\ using\ a\ template\ from\ configuration
351
444
  complete -c doing -l duration -f -n '__fish_doing_using_command since' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
352
445
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command since' -d Output\ to\ export\ format
353
446
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command since' -d Section
354
447
  complete -c doing -l times -s t -f -n '__fish_doing_using_command since' -d Show\ time\ intervals\ on\ @done\ tasks
355
448
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command since' -d Sort\ tags\ by
449
+ complete -c doing -l template -f -r -n '__fish_doing_using_command since' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
356
450
  complete -c doing -l totals -f -n '__fish_doing_using_command since' -d Show\ time\ totals\ at\ the\ end\ of\ output
357
451
  complete -c doing -l autotag -s a -f -n '__fish_doing_using_command tag' -d Autotag\ entries\ based\ on\ autotag\ configuration\ in\ \~/
358
452
  complete -c doing -l bool -f -r -n '__fish_doing_using_command tag' -d Boolean
@@ -377,6 +471,7 @@ complete -c doing -l bool -f -r -n '__fish_doing_using_command tags' -d Boolean
377
471
  complete -c doing -l counts -s c -f -n '__fish_doing_using_command tags' -d Show\ count\ of\ occurrences
378
472
  complete -c doing -l case -f -r -n '__fish_doing_using_command tags' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
379
473
  complete -c doing -l interactive -s i -f -n '__fish_doing_using_command tags' -d Select\ items\ to\ scan\ from\ a\ menu\ of\ matching\ entries
474
+ complete -c doing -l line -s l -f -n '__fish_doing_using_command tags' -d Output\ in\ a\ single\ line\ with\ @\ symbols
380
475
  complete -c doing -l not -f -n '__fish_doing_using_command tags' -d Get\ tags\ from\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
381
476
  complete -c doing -l order -s o -f -r -n '__fish_doing_using_command tags' -d Sort\ order
382
477
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command tags' -d Section
@@ -391,12 +486,14 @@ complete -c doing -l path -s p -f -r -n '__fish_doing_using_command template' -d
391
486
  complete -c doing -l save -s s -f -n '__fish_doing_using_command template' -d Save\ template\ to\ file\ instead\ of\ STDOUT
392
487
  complete -c doing -l after -f -r -n '__fish_doing_using_command today' -d View\ entries\ after\ specified\ time
393
488
  complete -c doing -l before -f -r -n '__fish_doing_using_command today' -d View\ entries\ before\ specified\ time
489
+ complete -c doing -l config_template -f -r -n '__fish_doing_using_command today' -d Output\ using\ a\ template\ from\ configuration
394
490
  complete -c doing -l duration -f -n '__fish_doing_using_command today' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
395
491
  complete -c doing -l from -f -r -n '__fish_doing_using_command today' -d Time\ range\ to\ show\ \`doing\ today\ --from\ \"12pm\ to\ 4pm\"\`
396
492
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command today' -d Output\ to\ export\ format
397
493
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command today' -d Specify\ a\ section
398
494
  complete -c doing -l times -s t -f -n '__fish_doing_using_command today' -d Show\ time\ intervals\ on\ @done\ tasks
399
495
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command today' -d Sort\ tags\ by
496
+ complete -c doing -l template -f -r -n '__fish_doing_using_command today' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
400
497
  complete -c doing -l totals -f -n '__fish_doing_using_command today' -d Show\ time\ totals\ at\ the\ end\ of\ output
401
498
  complete -c doing -l file -s f -f -r -n '__fish_doing_using_command undo' -d Specify\ alternate\ doing\ file
402
499
  complete -c doing -l interactive -s i -f -n '__fish_doing_using_command undo' -d Select\ from\ recent\ backups
@@ -436,6 +533,7 @@ complete -c doing -l search -f -r -n '__fish_doing_using_command wiki' -d Searc
436
533
  complete -c doing -l tag -f -r -n '__fish_doing_using_command wiki' -d Tag\ filter
437
534
  complete -c doing -l after -f -r -n '__fish_doing_using_command yesterday' -d View\ entries\ after\ specified\ time
438
535
  complete -c doing -l before -f -r -n '__fish_doing_using_command yesterday' -d View\ entries\ before\ specified\ time
536
+ complete -c doing -l config_template -f -r -n '__fish_doing_using_command yesterday' -d Output\ using\ a\ template\ from\ configuration
439
537
  complete -c doing -l duration -f -n '__fish_doing_using_command yesterday' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
440
538
  complete -c doing -l from -f -r -n '__fish_doing_using_command yesterday' -d Time\ range\ to\ show
441
539
  complete -c doing -l output -s o -f -r -n '__fish_doing_using_command yesterday' -d Output\ to\ export\ format
@@ -443,8 +541,9 @@ complete -c doing -l section -s s -f -r -n '__fish_doing_using_command yesterday
443
541
  complete -c doing -l times -s t -f -n '__fish_doing_using_command yesterday' -d Show\ time\ intervals\ on\ @done\ tasks
444
542
  complete -c doing -l tag_order -f -r -n '__fish_doing_using_command yesterday' -d Tag\ sort\ direction
445
543
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command yesterday' -d Sort\ tags\ by
544
+ complete -c doing -l template -f -r -n '__fish_doing_using_command yesterday' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
446
545
  complete -c doing -l totals -f -n '__fish_doing_using_command yesterday' -d Show\ time\ totals\ at\ the\ end\ of\ output
447
- 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_plugins)'
546
+ 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)'
448
547
  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'
449
548
  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 show tag tags tags view' -a 'case-sensitive ignore smart'
450
549
  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'
data/lib/doing/array.rb CHANGED
@@ -11,17 +11,18 @@ module Doing
11
11
  ## @return [Array] array of strings
12
12
  ##
13
13
  def tags_to_array
14
- map { |t| t.sub(/^@/, '') }
14
+ map(&:remove_at)
15
15
  end
16
16
 
17
17
  # Convert strings to @tags
18
18
  #
19
- # @example `['one', '@two', 'three'].to_tags`
20
- # @example `=> ['@one', '@two', '@three']`
21
19
  # @return [Array] Array of @tags
22
20
  #
21
+ # @example
22
+ # ['one', '@two', 'three'].to_tags
23
+ # # => ['@one', '@two', '@three']
23
24
  def to_tags
24
- map { |t| t.sub(/^@?/, '@') }
25
+ map(&:add_at)
25
26
  end
26
27
 
27
28
  def to_tags!
@@ -6,9 +6,10 @@ module Doing
6
6
  ##
7
7
  ## Format [d, h, m] as string
8
8
  ##
9
- ## @param time [Array] Array of [days, hours,
10
- ## minutes]
11
- ## @param format [Symbol] The format, :dhm, :hm, :m, :clock, :natural
9
+ ## @accept [Array] Array of [days, hours, minutes]
10
+ ##
11
+ ## @param format [Symbol] The format, :dhm, :hm,
12
+ ## :m, :clock, :natural
12
13
  ## @return [String] formatted string
13
14
  ##
14
15
  def time_string(format: :dhm)
@@ -0,0 +1,115 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Doing
4
+ # A single version's entries
5
+ class Change
6
+ attr_reader :version, :content
7
+
8
+ attr_accessor :entries
9
+
10
+ def initialize(version, content)
11
+ @version = Version.new(version)
12
+ @content = content
13
+ parse_entries
14
+ end
15
+
16
+ def parse_entries
17
+ @entries = []
18
+ types = @content.scan(/(?<=\n|\A)#### (NEW|IMPROVED|FIXED)(.*?)(?=\n####|\Z)/m)
19
+ types.each do |type|
20
+ type[1].scan(/\s*- +(.*?)$/).each do |entry|
21
+ @entries << Entry.new(entry[0].strip, type[0])
22
+ end
23
+ end
24
+ end
25
+
26
+ def search_entries(search_string)
27
+ case_type = :ignore
28
+
29
+ matches = []
30
+
31
+ if search_string.is_rx?
32
+ matches = @entries.select { |e| e.string =~ search_string.to_rx(distance: 2, case_type: case_type) }
33
+ else
34
+ query = search_string.gsub(/(-)?--/, '\1]]').to_phrase_query
35
+
36
+ if query[:must].nil? && query[:must_not].nil?
37
+ query[:must] = query[:should]
38
+ query[:should] = []
39
+ end
40
+
41
+ @entries.each do |entry|
42
+ m = no_searches?(entry.string, query[:must_not])
43
+ m &&= all_searches?(entry.string, query[:must])
44
+ m &&= any_searches?(entry.string, query[:should])
45
+ matches << entry if m
46
+ end
47
+ end
48
+
49
+ @entries = matches.count.positive? ? matches : nil
50
+ end
51
+
52
+ def to_h
53
+ { version: @version, content: @content }
54
+ end
55
+
56
+ def to_s
57
+ out = ["### #{@version}"]
58
+ items = {
59
+ new: [],
60
+ improved: [],
61
+ fixed: [],
62
+ other: []
63
+ }
64
+ @entries.each do |e|
65
+ type = e.type.downcase.to_sym
66
+ if items.key?(type)
67
+ items[type] << e
68
+ else
69
+ items[:other] << e
70
+ end
71
+ end
72
+
73
+ items.each do |type, members|
74
+ if members.count.positive?
75
+ out << "#### #{type.to_s.capitalize}"
76
+ out << members.map(&:to_s).join("\n")
77
+ end
78
+ end
79
+
80
+ out.join("\n\n")
81
+ end
82
+
83
+ private
84
+
85
+ def all_searches?(text, searches)
86
+ return true if searches.nil? || searches.empty?
87
+
88
+ searches.each do |s|
89
+ rx = Regexp.new(s.wildcard_to_rx, true)
90
+ return false unless text =~ rx
91
+ end
92
+ true
93
+ end
94
+
95
+ def no_searches?(text, searches)
96
+ return true if searches.nil? || searches.empty?
97
+
98
+ searches.each do |s|
99
+ rx = Regexp.new(s.wildcard_to_rx, true)
100
+ return false if text =~ rx
101
+ end
102
+ true
103
+ end
104
+
105
+ def any_searches?(text, searches)
106
+ return true if searches.nil? || searches.empty?
107
+
108
+ searches.each do |s|
109
+ rx = Regexp.new(s.wildcard_to_rx, true)
110
+ return true if text =~ rx
111
+ end
112
+ false
113
+ end
114
+ end
115
+ end