doing 2.1.90 → 2.1.93

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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +1 -1
  5. data/bin/commands/tags.rb +1 -1
  6. data/docs/doc/Array.html +3 -3
  7. data/docs/doc/BooleanTermParser/Clause.html +3 -3
  8. data/docs/doc/BooleanTermParser/Operator.html +3 -3
  9. data/docs/doc/BooleanTermParser/Query.html +3 -3
  10. data/docs/doc/BooleanTermParser/QueryParser.html +3 -3
  11. data/docs/doc/BooleanTermParser/QueryTransformer.html +3 -3
  12. data/docs/doc/BooleanTermParser.html +3 -3
  13. data/docs/doc/Doing/ArrayCleanup.html +3 -3
  14. data/docs/doc/Doing/ArrayNestedHash.html +3 -3
  15. data/docs/doc/Doing/ArrayTags.html +3 -3
  16. data/docs/doc/Doing/ByDayExport.html +3 -3
  17. data/docs/doc/Doing/CSVExport.html +3 -3
  18. data/docs/doc/Doing/CalendarImport.html +3 -3
  19. data/docs/doc/Doing/Change.html +3 -3
  20. data/docs/doc/Doing/Changes.html +3 -3
  21. data/docs/doc/Doing/ChronifyArray.html +3 -3
  22. data/docs/doc/Doing/ChronifyNumeric.html +3 -3
  23. data/docs/doc/Doing/ChronifyString.html +3 -3
  24. data/docs/doc/Doing/Color.html +3 -3
  25. data/docs/doc/Doing/Completion/BashCompletions.html +3 -3
  26. data/docs/doc/Doing/Completion/FigCompletions.html +3 -3
  27. data/docs/doc/Doing/Completion/FishCompletions.html +3 -3
  28. data/docs/doc/Doing/Completion/StringUtils.html +3 -3
  29. data/docs/doc/Doing/Completion/ZshCompletions.html +3 -3
  30. data/docs/doc/Doing/Completion.html +3 -3
  31. data/docs/doc/Doing/Configuration.html +3 -3
  32. data/docs/doc/Doing/DayOneRenderer.html +3 -3
  33. data/docs/doc/Doing/DayoneExport.html +3 -3
  34. data/docs/doc/Doing/DoingExport.html +3 -3
  35. data/docs/doc/Doing/DoingImport.html +3 -3
  36. data/docs/doc/Doing/Entry.html +3 -3
  37. data/docs/doc/Doing/Errors/DoingNoTraceError.html +3 -3
  38. data/docs/doc/Doing/Errors/DoingRuntimeError.html +3 -3
  39. data/docs/doc/Doing/Errors/DoingStandardError.html +3 -3
  40. data/docs/doc/Doing/Errors/EmptyInput.html +3 -3
  41. data/docs/doc/Doing/Errors/HistoryLimitError.html +3 -3
  42. data/docs/doc/Doing/Errors/InvalidPlugin.html +3 -3
  43. data/docs/doc/Doing/Errors/MissingBackupFile.html +3 -3
  44. data/docs/doc/Doing/Errors/NoResults.html +3 -3
  45. data/docs/doc/Doing/Errors/PluginException.html +3 -3
  46. data/docs/doc/Doing/Errors/UserCancelled.html +3 -3
  47. data/docs/doc/Doing/Errors/WrongCommand.html +3 -3
  48. data/docs/doc/Doing/Errors.html +3 -3
  49. data/docs/doc/Doing/HTMLExport.html +3 -3
  50. data/docs/doc/Doing/Hooks.html +3 -3
  51. data/docs/doc/Doing/Item.html +3 -3
  52. data/docs/doc/Doing/ItemDates.html +3 -3
  53. data/docs/doc/Doing/ItemQuery.html +3 -3
  54. data/docs/doc/Doing/ItemState.html +3 -3
  55. data/docs/doc/Doing/ItemTags.html +3 -3
  56. data/docs/doc/Doing/Items.html +3 -3
  57. data/docs/doc/Doing/JSONExport.html +3 -3
  58. data/docs/doc/Doing/JSONImport.html +3 -3
  59. data/docs/doc/Doing/Logger.html +3 -3
  60. data/docs/doc/Doing/MarkdownExport.html +3 -3
  61. data/docs/doc/Doing/Note.html +3 -3
  62. data/docs/doc/Doing/Pager.html +3 -3
  63. data/docs/doc/Doing/Plugins.html +3 -3
  64. data/docs/doc/Doing/Prompt.html +3 -3
  65. data/docs/doc/Doing/PromptChoose.html +3 -3
  66. data/docs/doc/Doing/PromptFZF.html +3 -3
  67. data/docs/doc/Doing/PromptInput.html +3 -3
  68. data/docs/doc/Doing/PromptSTD.html +3 -3
  69. data/docs/doc/Doing/PromptYN.html +3 -3
  70. data/docs/doc/Doing/Section.html +3 -3
  71. data/docs/doc/Doing/StringHighlight.html +3 -3
  72. data/docs/doc/Doing/StringNormalize.html +3 -3
  73. data/docs/doc/Doing/StringQuery.html +3 -3
  74. data/docs/doc/Doing/StringTags.html +3 -3
  75. data/docs/doc/Doing/StringTransform.html +3 -3
  76. data/docs/doc/Doing/StringTruncate.html +3 -3
  77. data/docs/doc/Doing/StringURL.html +3 -3
  78. data/docs/doc/Doing/SymbolNormalize.html +3 -3
  79. data/docs/doc/Doing/TaskPaperExport.html +3 -3
  80. data/docs/doc/Doing/TemplateExport.html +3 -3
  81. data/docs/doc/Doing/TemplateString.html +3 -3
  82. data/docs/doc/Doing/TimingImport.html +3 -3
  83. data/docs/doc/Doing/Types.html +3 -3
  84. data/docs/doc/Doing/Util/Backup.html +3 -3
  85. data/docs/doc/Doing/Util.html +3 -3
  86. data/docs/doc/Doing/Version.html +3 -3
  87. data/docs/doc/Doing/WWID.html +3 -3
  88. data/docs/doc/Doing.html +4 -4
  89. data/docs/doc/FalseClass.html +3 -3
  90. data/docs/doc/GLI/Commands/Help.html +3 -3
  91. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +3 -3
  92. data/docs/doc/GLI/Commands.html +3 -3
  93. data/docs/doc/GLI.html +3 -3
  94. data/docs/doc/Hash.html +3 -3
  95. data/docs/doc/Numeric.html +3 -3
  96. data/docs/doc/Object.html +3 -3
  97. data/docs/doc/PhraseParser/Operator.html +3 -3
  98. data/docs/doc/PhraseParser/PhraseClause.html +3 -3
  99. data/docs/doc/PhraseParser/Query.html +3 -3
  100. data/docs/doc/PhraseParser/QueryParser.html +3 -3
  101. data/docs/doc/PhraseParser/QueryTransformer.html +3 -3
  102. data/docs/doc/PhraseParser/TermClause.html +3 -3
  103. data/docs/doc/PhraseParser.html +3 -3
  104. data/docs/doc/Status.html +3 -3
  105. data/docs/doc/String.html +3 -3
  106. data/docs/doc/Symbol.html +3 -3
  107. data/docs/doc/Time.html +3 -3
  108. data/docs/doc/TrueClass.html +3 -3
  109. data/docs/doc/_index.html +4 -4
  110. data/docs/doc/css/style.css +2 -15
  111. data/docs/doc/file.README.html +4 -4
  112. data/docs/doc/frames.html +1 -1
  113. data/docs/doc/index.html +4 -4
  114. data/docs/doc/js/app.js +91 -40
  115. data/docs/doc/js/full_list.js +22 -20
  116. data/docs/doc/top-level-namespace.html +3 -3
  117. data/doing.rdoc +1 -30
  118. data/lib/completion/_doing.zsh +0 -4
  119. data/lib/completion/doing.bash +0 -11
  120. data/lib/completion/doing.fish +0 -5
  121. data/lib/completion/doing.ts +0 -40
  122. data/lib/doing/item/item.rb +1 -1
  123. data/lib/doing/item/query.rb +4 -4
  124. data/lib/doing/prompt/input.rb +7 -7
  125. data/lib/doing/version.rb +1 -1
  126. data/lib/doing/wwid/interactive.rb +1 -1
  127. data/lib/doing/wwid/modify.rb +4 -3
  128. metadata +2 -2
@@ -20,17 +20,6 @@ function escapeShortcut() {
20
20
  });
21
21
  }
22
22
 
23
- function navResizer() {
24
- $(window).mousemove(function(e) {
25
- window.parent.postMessage({
26
- action: 'mousemove', event: {pageX: e.pageX, which: e.which}
27
- }, '*');
28
- }).mouseup(function(e) {
29
- window.parent.postMessage({action: 'mouseup'}, '*');
30
- });
31
- window.parent.postMessage("navReady", "*");
32
- }
33
-
34
23
  function clearSearchTimeout() {
35
24
  clearTimeout(searchTimeout);
36
25
  searchTimeout = null;
@@ -44,14 +33,21 @@ function enableLinks() {
44
33
  $clicked.addClass('clicked');
45
34
  evt.stopPropagation();
46
35
 
47
- if (evt.target.tagName === 'A') return true;
36
+ if (window.origin === "null") {
37
+ if (evt.target.tagName === 'A') return true;
48
38
 
49
- var elem = $clicked.find('> .item .object_link a')[0];
50
- var e = evt.originalEvent;
51
- var newEvent = new MouseEvent(evt.originalEvent.type);
52
- newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
53
- elem.dispatchEvent(newEvent);
54
- evt.preventDefault();
39
+ var elem = $clicked.find('> .item .object_link a')[0];
40
+ var e = evt.originalEvent;
41
+ var newEvent = new MouseEvent(evt.originalEvent.type);
42
+ newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
43
+ elem.dispatchEvent(newEvent);
44
+ evt.preventDefault();
45
+ } else {
46
+ window.top.postMessage({
47
+ action: "navigate",
48
+ url: $clicked.find('.object_link a').attr('href'),
49
+ }, "*");
50
+ }
55
51
  return false;
56
52
  });
57
53
  }
@@ -199,6 +195,13 @@ function highlight() {
199
195
  });
200
196
  }
201
197
 
198
+ function isInView(element) {
199
+ const rect = element.getBoundingClientRect();
200
+ const windowHeight =
201
+ window.innerHeight || document.documentElement.clientHeight;
202
+ return rect.left >= 0 && rect.bottom <= windowHeight;
203
+ }
204
+
202
205
  /**
203
206
  * Expands the tree to the target element and its immediate
204
207
  * children.
@@ -214,7 +217,7 @@ function expandTo(path) {
214
217
  $(el).find('> div > a.toggle').attr('aria-expanded', 'true');
215
218
  });
216
219
 
217
- if($target[0]) {
220
+ if($target[0] && !isInView($target[0])) {
218
221
  window.scrollTo(window.scrollX, $target.offset().top - 250);
219
222
  highlight();
220
223
  }
@@ -232,7 +235,6 @@ window.addEventListener("message", windowEvents, false);
232
235
 
233
236
  $(document).ready(function() {
234
237
  escapeShortcut();
235
- navResizer();
236
238
  enableLinks();
237
239
  enableToggles();
238
240
  populateSearchCache();
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.9.37
9
+ &mdash; Documentation by YARD 0.9.38
10
10
 
11
11
  </title>
12
12
 
@@ -216,9 +216,9 @@
216
216
  </div>
217
217
 
218
218
  <div id="footer">
219
- Generated on Thu Oct 23 08:05:56 2025 by
219
+ Generated on Tue Feb 10 04:26:33 2026 by
220
220
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
221
- 0.9.37 (ruby-3.4.4).
221
+ 0.9.38 (ruby-3.4.4).
222
222
  </div>
223
223
 
224
224
  </div>
data/doing.rdoc CHANGED
@@ -5,7 +5,7 @@ record of what you've been doing, complete with tag-based time tracking. The
5
5
  command line tool allows you to add entries, annotate with tags and notes, and
6
6
  view your entries with myriad options, with a focus on a "natural" language syntax.
7
7
 
8
- v2.1.90
8
+ v2.1.93
9
9
 
10
10
  === Global Options
11
11
  === --config_file arg
@@ -1289,35 +1289,6 @@ Force exact search string matching (case sensitive)
1289
1289
 
1290
1290
 
1291
1291
 
1292
- ==== Command: <tt>later ENTRY</tt>
1293
- Add an item to the Later section
1294
-
1295
-
1296
- ===== Options
1297
- ===== -b|--back|--started DATE_STRING
1298
-
1299
- Backdate start time to date string [4pm|20m|2h|yesterday noon]
1300
-
1301
- [Default Value] None
1302
-
1303
-
1304
- ===== -n|--note TEXT
1305
-
1306
- Note
1307
-
1308
- [Default Value] None
1309
-
1310
-
1311
- ===== --ask
1312
- Prompt for note via multi-line input
1313
-
1314
-
1315
-
1316
- ===== -e|--editor
1317
- Edit entry with vim
1318
-
1319
-
1320
-
1321
1292
  ==== Command: <tt>mark|flag </tt>
1322
1293
  Mark last entry as flagged
1323
1294
 
@@ -27,7 +27,6 @@ function _doing() {
27
27
  'help:Shows a list of commands or help for one command'
28
28
  'import:Import entries from an external source'
29
29
  'last:Show the last entry'
30
- 'later:Add an item to the Later section'
31
30
  'mark:Mark last entry as flagged'
32
31
  'flag:Mark last entry as flagged'
33
32
  'meanwhile:Finish any running @meanwhile tasks and optionally create a new one'
@@ -128,9 +127,6 @@ function _doing() {
128
127
  last)
129
128
  args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" {'(--delete)-d','(-d)--delete'}"[Delete the last entry]" "--duration[Show elapsed time if entry is not tagged @done]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
130
129
  ;;
131
- later)
132
- args=( "--ask[Prompt for note via multi-line input]" "--started[Backdate start time to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--note)-n','(-n)--note'}"[Note]:TEXT:" )
133
- ;;
134
130
  mark)
135
131
  args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to tag]:COUNT:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--date)-d','(-d)--date'}"[Include current date/time with tag]" "--force[Don't ask permission to flag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to flag from a menu of matching entries]" "--not[Flag items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove flag]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Flag last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
136
132
  ;;
@@ -148,16 +148,6 @@ _doing_last() {
148
148
  fi
149
149
  }
150
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
151
  _doing_mark() {
162
152
 
163
153
  if [[ "$token" == --* ]]; then
@@ -476,7 +466,6 @@ _doing()
476
466
  elif [[ $last =~ (help) ]]; then _doing_help
477
467
  elif [[ $last =~ (import) ]]; then _doing_import
478
468
  elif [[ $last =~ (last) ]]; then _doing_last
479
- elif [[ $last =~ (later) ]]; then _doing_later
480
469
  elif [[ $last =~ (mark|flag) ]]; then _doing_mark
481
470
  elif [[ $last =~ (meanwhile) ]]; then _doing_meanwhile
482
471
  elif [[ $last =~ (note) ]]; then _doing_note
@@ -150,7 +150,6 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'grep search' -d Search\ f
150
150
  complete -xc doing -n '__fish_doing_needs_command' -a 'help' -d Shows\ a\ list\ of\ commands\ or\ help\ for\ one\ command
151
151
  complete -xc doing -n '__fish_doing_needs_command' -a 'import' -d Import\ entries\ from\ an\ external\ source
152
152
  complete -xc doing -n '__fish_doing_needs_command' -a 'last' -d Show\ the\ last\ entry
153
- complete -xc doing -n '__fish_doing_needs_command' -a 'later' -d Add\ an\ item\ to\ the\ Later\ section
154
153
  complete -xc doing -n '__fish_doing_needs_command' -a 'mark flag' -d Mark\ last\ entry\ as\ flagged
155
154
  complete -xc doing -n '__fish_doing_needs_command' -a 'meanwhile' -d Finish\ any\ running\ @meanwhile\ tasks\ and\ optionally\ create\ a\ new\ one
156
155
  complete -xc doing -n '__fish_doing_needs_command' -a 'note' -d Add\ a\ note\ to\ the\ last\ entry
@@ -328,10 +327,6 @@ complete -c doing -l template -f -r -n '__fish_doing_using_command last' -d Ove
328
327
  complete -c doing -l title -f -r -n '__fish_doing_using_command last' -d Title\ string\ to\ be\ used\ for\ output\ formats\ that\ require\ it
329
328
  complete -c doing -l val -f -r -n '__fish_doing_using_command last' -d Perform\ a\ tag\ value\ query
330
329
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command last' -d Force\ exact\ search\ string\ matching
331
- complete -c doing -l ask -f -n '__fish_doing_using_command later' -d Prompt\ for\ note\ via\ multi-line\ input
332
- 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\]
333
- complete -c doing -l editor -s e -f -n '__fish_doing_using_command later' -d Edit\ entry\ with\ vim
334
- complete -c doing -l note -s n -f -r -n '__fish_doing_using_command later' -d Note
335
330
  complete -c doing -l bool -f -r -n '__fish_doing_using_command mark flag' -d Boolean\ used\ to\ combine\ multiple\ tags
336
331
  complete -c doing -l count -s c -f -r -n '__fish_doing_using_command mark flag' -d How\ many\ recent\ entries\ to\ tag
337
332
  complete -c doing -l case -f -r -n '__fish_doing_using_command mark flag' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
@@ -2023,46 +2023,6 @@ const completionSpec: Fig.Spec = {
2023
2023
 
2024
2024
  },
2025
2025
 
2026
- {
2027
- name: "later",
2028
- description: "Add an item to the Later section",
2029
- options: [
2030
- {
2031
- name: ["--ask"],
2032
- description: "Prompt for note via multi-line input",
2033
-
2034
- },
2035
-
2036
- {
2037
- name: ["--started"],
2038
- description: "Backdate start time to date string [4pm|20m|2h|yesterday noon]",
2039
- args: {
2040
- name: "DATE_STRING",
2041
- description: "DATE_STRING",
2042
- },
2043
-
2044
- },
2045
-
2046
- {
2047
- name: ["-e", "--editor"],
2048
- description: "Edit entry with vim",
2049
-
2050
- },
2051
-
2052
- {
2053
- name: ["-n", "--note"],
2054
- description: "Note",
2055
- args: {
2056
- name: "TEXT",
2057
- description: "TEXT",
2058
- },
2059
-
2060
- },
2061
-
2062
- ],
2063
-
2064
- },
2065
-
2066
2026
  {
2067
2027
  name: "mark",
2068
2028
  description: "Mark last entry as flagged",
@@ -105,7 +105,7 @@ module Doing
105
105
  when :date
106
106
  output << format('%13s |', @date.relative_date).cyan
107
107
  when :section
108
- output << "#{magenta}(#{white(@section)}#{magenta})"
108
+ output << "#{Color.magenta}(#{Color.white(@section)}#{Color.magenta})"
109
109
  when :title
110
110
  output << @title.white.highlight_tags('cyan')
111
111
  end
@@ -78,8 +78,8 @@ module Doing
78
78
 
79
79
  if search.rx? || matching == :fuzzy
80
80
  rx = search.to_rx(distance: distance, case_type: case_type)
81
- new_title = @title.gsub(rx) { |m| yellow(m) }
82
- new_note.add(@note.to_s.gsub(rx) { |m| yellow(m) })
81
+ new_title = @title.gsub(rx) { |m| Color.yellow(m) }
82
+ new_note.add(@note.to_s.gsub(rx) { |m| Color.yellow(m) })
83
83
  else
84
84
  query = search.strip.to_phrase_query
85
85
 
@@ -89,8 +89,8 @@ module Doing
89
89
  end
90
90
  query[:must].concat(query[:should]).each do |s|
91
91
  rx = Regexp.new(s.wildcard_to_rx, ignore_case(s, case_type))
92
- new_title = @title.gsub(rx) { |m| yellow(m) }
93
- new_note.add(@note.to_s.gsub(rx) { |m| yellow(m) })
92
+ new_title = @title.gsub(rx) { |m| Color.yellow(m) }
93
+ new_note.add(@note.to_s.gsub(rx) { |m| Color.yellow(m) })
94
94
  end
95
95
  end
96
96
 
@@ -20,7 +20,7 @@ module Doing
20
20
  $stdin.reopen('/dev/tty')
21
21
  return default_response if @default_answer
22
22
 
23
- print "#{yellow(prompt).sub(/:?$/, ':')} #{reset}"
23
+ print "#{Color.yellow(prompt).sub(/:?$/, ':')} #{Color.reset}"
24
24
  $stdin.gets.strip
25
25
  end
26
26
 
@@ -50,7 +50,7 @@ module Doing
50
50
  end
51
51
 
52
52
  begin
53
- Readline.readline("#{yellow(prompt).sub(/:?$/, ':')} #{reset}", true).strip
53
+ Readline.readline("#{Color.yellow(prompt).sub(/:?$/, ':')} #{Color.reset}", true).strip
54
54
  rescue Interrupt
55
55
  raise UserCancelled
56
56
  end
@@ -82,8 +82,8 @@ module Doing
82
82
  '(%<keycolor>sreturn twice%<textcolor>s)',
83
83
  'to end editing and save,',
84
84
  '%<keycolor>sCTRL-C%<textcolor>s to cancel%<reset>s'].join(' '),
85
- { promptcolor: boldgreen, prompt: prompt.sub(/:?$/, ':'),
86
- textcolor: yellow, keycolor: boldwhite, reset: reset })
85
+ { promptcolor: Color.boldgreen, prompt: prompt.sub(/:?$/, ':'),
86
+ textcolor: Color.yellow, keycolor: Color.boldwhite, reset: Color.reset })
87
87
 
88
88
  res = []
89
89
 
@@ -116,10 +116,10 @@ module Doing
116
116
 
117
117
  ask_note = []
118
118
  reader = TTY::Reader.new(interrupt: -> { raise Errors::UserCancelled }, track_history: false)
119
- puts "#{boldgreen(prompt.sub(/:?$/,
120
- ':'))} #{yellow('Hit return for a new line, ')}#{boldwhite('enter a blank line (')}#{boldyellow('return twice')}#{boldwhite(') to end editing')}"
119
+ puts "#{Color.boldgreen(prompt.sub(/:?$/,
120
+ ':'))} #{Color.yellow('Hit return for a new line, ')}#{Color.boldwhite('enter a blank line (')}#{Color.boldyellow('return twice')}#{Color.boldwhite(') to end editing')}"
121
121
  loop do
122
- res = reader.read_line(green('> '))
122
+ res = reader.read_line(Color.green('> '))
123
123
  break if res.strip.empty?
124
124
 
125
125
  ask_note.push(res)
data/lib/doing/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Doing
4
- VERSION = '2.1.90'
4
+ VERSION = '2.1.93'
5
5
  end
@@ -365,7 +365,7 @@ module Doing
365
365
  elapsed = finish_date - date
366
366
 
367
367
  if max_elapsed.positive? && (elapsed > max_elapsed)
368
- puts boldwhite(title) if title
368
+ puts Color.boldwhite(title) if title
369
369
  human = elapsed.time_string(format: :natural)
370
370
  res = Prompt.yn(Color.yellow("Did this entry actually take #{human}"), default_response: true)
371
371
  unless res
@@ -186,7 +186,8 @@ module Doing
186
186
  items = filter_items(Items.new, opt: opt)
187
187
 
188
188
  if opt[:interactive]
189
- items = Prompt.choose_from_items(items, include_section: opt[:section] =~ /^all$/i, menu: true,
189
+ include_section = Array(opt[:section]).any? { |sec| sec.to_s =~ /^all$/i }
190
+ items = Prompt.choose_from_items(items, include_section: include_section, menu: true,
190
191
  header: '',
191
192
  prompt: 'Select entries to tag > ',
192
193
  multiple: true,
@@ -266,7 +267,7 @@ module Doing
266
267
  elapsed = done_date - item.date
267
268
 
268
269
  if max_elapsed.positive? && (elapsed > max_elapsed) && !opt[:took]
269
- puts boldwhite(item.title)
270
+ puts Color.boldwhite(item.title)
270
271
  human = elapsed.time_string(format: :natural)
271
272
  res = Prompt.yn(Color.yellow("Did this actually take #{human}"), default_response: true)
272
273
  unless res
@@ -399,7 +400,7 @@ module Doing
399
400
  ##
400
401
  def delete_items(items, force: false)
401
402
  items.slice(0, 5).each { |i| puts i.to_pretty } unless force
402
- puts softpurple("+ #{items.size - 5} additional #{'item'.to_p(items.size - 5)}") if items.size > 5 && !force
403
+ puts Color.softpurple("+ #{items.size - 5} additional #{'item'.to_p(items.size - 5)}") if items.size > 5 && !force
403
404
 
404
405
  res = force ? true : Prompt.yn("Delete #{items.size} #{'item'.to_p(items.size)}?", default_response: 'y')
405
406
  return unless res
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.90
4
+ version: 2.1.93
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
@@ -943,7 +943,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
943
943
  - !ruby/object:Gem::Version
944
944
  version: '0'
945
945
  requirements: []
946
- rubygems_version: 3.6.7
946
+ rubygems_version: 4.0.3
947
947
  specification_version: 4
948
948
  summary: A command line tool for managing What Was I Doing reminders
949
949
  test_files: []