doing 2.1.85 → 2.1.86

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/Gemfile.lock +3 -3
  4. data/README.md +1 -1
  5. data/docs/doc/Array.html +1 -1
  6. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  7. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  8. data/docs/doc/BooleanTermParser/Query.html +1 -1
  9. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  10. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  11. data/docs/doc/BooleanTermParser.html +1 -1
  12. data/docs/doc/Doing/ArrayCleanup.html +1 -1
  13. data/docs/doc/Doing/ArrayNestedHash.html +1 -1
  14. data/docs/doc/Doing/ArrayTags.html +1 -1
  15. data/docs/doc/Doing/ByDayExport.html +1 -1
  16. data/docs/doc/Doing/CSVExport.html +1 -1
  17. data/docs/doc/Doing/CalendarImport.html +1 -1
  18. data/docs/doc/Doing/Change.html +1 -1
  19. data/docs/doc/Doing/Changes.html +1 -1
  20. data/docs/doc/Doing/ChronifyArray.html +1 -1
  21. data/docs/doc/Doing/ChronifyNumeric.html +1 -1
  22. data/docs/doc/Doing/ChronifyString.html +1 -1
  23. data/docs/doc/Doing/Color.html +1 -1
  24. data/docs/doc/Doing/Completion/BashCompletions.html +1 -1
  25. data/docs/doc/Doing/Completion/FigCompletions.html +1 -1
  26. data/docs/doc/Doing/Completion/FishCompletions.html +1 -1
  27. data/docs/doc/Doing/Completion/StringUtils.html +1 -1
  28. data/docs/doc/Doing/Completion/ZshCompletions.html +1 -1
  29. data/docs/doc/Doing/Completion.html +1 -1
  30. data/docs/doc/Doing/Configuration.html +1 -1
  31. data/docs/doc/Doing/DayOneRenderer.html +1 -1
  32. data/docs/doc/Doing/DayoneExport.html +1 -1
  33. data/docs/doc/Doing/DoingExport.html +1 -1
  34. data/docs/doc/Doing/DoingImport.html +1 -1
  35. data/docs/doc/Doing/Entry.html +1 -1
  36. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  37. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  38. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  39. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  40. data/docs/doc/Doing/Errors/HistoryLimitError.html +1 -1
  41. data/docs/doc/Doing/Errors/InvalidPlugin.html +1 -1
  42. data/docs/doc/Doing/Errors/MissingBackupFile.html +1 -1
  43. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  44. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  45. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  46. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  47. data/docs/doc/Doing/Errors.html +1 -1
  48. data/docs/doc/Doing/HTMLExport.html +1 -1
  49. data/docs/doc/Doing/Hooks.html +1 -1
  50. data/docs/doc/Doing/Item.html +1 -1
  51. data/docs/doc/Doing/ItemDates.html +1 -1
  52. data/docs/doc/Doing/ItemQuery.html +1 -1
  53. data/docs/doc/Doing/ItemState.html +1 -1
  54. data/docs/doc/Doing/ItemTags.html +1 -1
  55. data/docs/doc/Doing/Items.html +1 -1
  56. data/docs/doc/Doing/JSONExport.html +1 -1
  57. data/docs/doc/Doing/JSONImport.html +1 -1
  58. data/docs/doc/Doing/Logger.html +1 -1
  59. data/docs/doc/Doing/MarkdownExport.html +1 -1
  60. data/docs/doc/Doing/Note.html +1 -1
  61. data/docs/doc/Doing/Pager.html +1 -1
  62. data/docs/doc/Doing/Plugins.html +1 -1
  63. data/docs/doc/Doing/Prompt.html +1 -1
  64. data/docs/doc/Doing/PromptChoose.html +1 -1
  65. data/docs/doc/Doing/PromptFZF.html +1 -1
  66. data/docs/doc/Doing/PromptInput.html +1 -1
  67. data/docs/doc/Doing/PromptSTD.html +1 -1
  68. data/docs/doc/Doing/PromptYN.html +1 -1
  69. data/docs/doc/Doing/Section.html +1 -1
  70. data/docs/doc/Doing/StringHighlight.html +1 -1
  71. data/docs/doc/Doing/StringNormalize.html +1 -1
  72. data/docs/doc/Doing/StringQuery.html +1 -1
  73. data/docs/doc/Doing/StringTags.html +1 -1
  74. data/docs/doc/Doing/StringTransform.html +1 -1
  75. data/docs/doc/Doing/StringTruncate.html +1 -1
  76. data/docs/doc/Doing/StringURL.html +1 -1
  77. data/docs/doc/Doing/SymbolNormalize.html +1 -1
  78. data/docs/doc/Doing/TaskPaperExport.html +1 -1
  79. data/docs/doc/Doing/TemplateExport.html +1 -1
  80. data/docs/doc/Doing/TemplateString.html +1 -1
  81. data/docs/doc/Doing/TimingImport.html +1 -1
  82. data/docs/doc/Doing/Types.html +1 -1
  83. data/docs/doc/Doing/Util/Backup.html +1 -1
  84. data/docs/doc/Doing/Util.html +1 -1
  85. data/docs/doc/Doing/Version.html +1 -1
  86. data/docs/doc/Doing/WWID.html +1 -1
  87. data/docs/doc/Doing.html +2 -2
  88. data/docs/doc/FalseClass.html +1 -1
  89. data/docs/doc/GLI/Commands/Help.html +1 -1
  90. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  91. data/docs/doc/GLI/Commands.html +1 -1
  92. data/docs/doc/GLI.html +1 -1
  93. data/docs/doc/Hash.html +1 -1
  94. data/docs/doc/Numeric.html +1 -1
  95. data/docs/doc/Object.html +1 -1
  96. data/docs/doc/PhraseParser/Operator.html +1 -1
  97. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  98. data/docs/doc/PhraseParser/Query.html +1 -1
  99. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  100. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  101. data/docs/doc/PhraseParser/TermClause.html +1 -1
  102. data/docs/doc/PhraseParser.html +1 -1
  103. data/docs/doc/Status.html +1 -1
  104. data/docs/doc/String.html +1 -1
  105. data/docs/doc/Symbol.html +1 -1
  106. data/docs/doc/Time.html +1 -1
  107. data/docs/doc/TrueClass.html +1 -1
  108. data/docs/doc/_index.html +1 -1
  109. data/docs/doc/file.README.html +2 -2
  110. data/docs/doc/index.html +2 -2
  111. data/docs/doc/top-level-namespace.html +1 -1
  112. data/doing.rdoc +23 -1
  113. data/lib/completion/_doing.zsh +4 -0
  114. data/lib/completion/doing.bash +11 -0
  115. data/lib/completion/doing.fish +4 -0
  116. data/lib/completion/doing.ts +30 -0
  117. data/lib/doing/chronify/string.rb +5 -3
  118. data/lib/doing/version.rb +1 -1
  119. metadata +1 -1
@@ -368,6 +368,16 @@ _doing_today() {
368
368
  fi
369
369
  }
370
370
 
371
+ _doing_todo() {
372
+
373
+ if [[ "$token" == --* ]]; then
374
+ COMPREPLY=( $( compgen -W '--ask --editor --note' -- $token ) )
375
+ elif [[ "$token" == -* ]]; then
376
+ COMPREPLY=( $( compgen -W '-e -n --ask --editor --note' -- $token ) )
377
+
378
+ fi
379
+ }
380
+
371
381
  _doing_undo() {
372
382
 
373
383
  if [[ "$token" == --* ]]; then
@@ -486,6 +496,7 @@ _doing()
486
496
  elif [[ $last =~ (tags) ]]; then _doing_tags
487
497
  elif [[ $last =~ (template) ]]; then _doing_template
488
498
  elif [[ $last =~ (today) ]]; then _doing_today
499
+ elif [[ $last =~ (todo) ]]; then _doing_todo
489
500
  elif [[ $last =~ (undo) ]]; then _doing_undo
490
501
  elif [[ $last =~ (update) ]]; then _doing_update
491
502
  elif [[ $last =~ (view) ]]; then _doing_view
@@ -172,6 +172,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'tags' -d List\ all\ tags\
172
172
  complete -xc doing -n '__fish_doing_needs_command' -a 'template' -d Output\ HTML
173
173
  complete -xc doing -n '__fish_doing_needs_command' -a 'test' -d Test\ Stuff
174
174
  complete -xc doing -n '__fish_doing_needs_command' -a 'today' -d List\ entries\ from\ today
175
+ complete -xc doing -n '__fish_doing_needs_command' -a 'todo' -d Add\ an\ item\ as\ a\ Todo
175
176
  complete -xc doing -n '__fish_doing_needs_command' -a 'undo' -d Undo\ the\ last\ X\ changes\ to\ the\ Doing\ file
176
177
  complete -xc doing -n '__fish_doing_needs_command' -a 'update' -d Update\ doing\ to\ the\ latest\ version
177
178
  complete -xc doing -n '__fish_doing_needs_command' -a 'view' -d Display\ a\ user-created\ view
@@ -561,6 +562,9 @@ complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command today' -d So
561
562
  complete -c doing -l template -f -r -n '__fish_doing_using_command today' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
562
563
  complete -c doing -l title -f -r -n '__fish_doing_using_command today' -d Title\ string\ to\ be\ used\ for\ output\ formats\ that\ require\ it
563
564
  complete -c doing -l totals -f -n '__fish_doing_using_command today' -d Show\ time\ totals\ at\ the\ end\ of\ output
565
+ complete -c doing -l ask -f -n '__fish_doing_using_command todo' -d Prompt\ for\ note\ via\ multi-line\ input
566
+ complete -c doing -l editor -s e -f -n '__fish_doing_using_command todo' -d Edit\ entry\ with\ vim
567
+ complete -c doing -l note -s n -f -r -n '__fish_doing_using_command todo' -d Note
564
568
  complete -c doing -l file -s f -f -r -n '__fish_doing_using_command undo' -d Specify\ alternate\ doing\ file
565
569
  complete -c doing -l interactive -s i -f -n '__fish_doing_using_command undo' -d Select\ from\ recent\ backups
566
570
  complete -c doing -l prune -s p -f -r -n '__fish_doing_using_command undo' -d Remove\ old\ backups
@@ -4463,6 +4463,36 @@ const completionSpec: Fig.Spec = {
4463
4463
 
4464
4464
  },
4465
4465
 
4466
+ {
4467
+ name: "todo",
4468
+ description: "Add an item as a Todo",
4469
+ options: [
4470
+ {
4471
+ name: ["--ask"],
4472
+ description: "Prompt for note via multi-line input",
4473
+
4474
+ },
4475
+
4476
+ {
4477
+ name: ["-e", "--editor"],
4478
+ description: "Edit entry with vim",
4479
+
4480
+ },
4481
+
4482
+ {
4483
+ name: ["-n", "--note"],
4484
+ description: "Note",
4485
+ args: {
4486
+ name: "TEXT",
4487
+ description: "TEXT",
4488
+ },
4489
+
4490
+ },
4491
+
4492
+ ],
4493
+
4494
+ },
4495
+
4466
4496
  {
4467
4497
  name: "undo",
4468
4498
  description: "Undo the last X changes to the Doing file",
@@ -206,7 +206,7 @@ module Doing
206
206
  finish = '11:59pm'
207
207
  else
208
208
  start = date_string.strip.chronify(guess: :begin, future: false)
209
- finish = date_string.strip.chronify(guess: :end)
209
+ finish = start + (24 * 60 * 60)
210
210
  end
211
211
  raise Errors::InvalidTimeExpression, 'Unrecognized date string' unless start
212
212
 
@@ -214,9 +214,11 @@ module Doing
214
214
 
215
215
 
216
216
  if start.is_a? String
217
- Doing.logger.debug('Parser:', "--from string interpreted as time span, from #{start || '12am'} to #{finish || '11:59pm'}")
217
+ Doing.logger.debug('Parser:',
218
+ "--from string interpreted as time span, from #{start || '12am'} to #{finish || '11:59pm'}")
218
219
  else
219
- Doing.logger.debug('Parser:', "date range interpreted as #{start.strftime('%F %R')} -- #{finish ? finish.strftime('%F %R') : 'now'}")
220
+ Doing.logger.debug('Parser:',
221
+ "date range interpreted as #{start.strftime('%F %R')} -- #{finish ? finish.strftime('%F %R') : 'now'}")
220
222
  end
221
223
  [start, finish]
222
224
  end
data/lib/doing/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '2.1.85'
2
+ VERSION = '2.1.86'
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.85
4
+ version: 2.1.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra