doing 2.1.97 → 2.1.99
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +1 -1
- data/bin/commands/done.rb +8 -4
- data/bin/commands/finish.rb +1 -1
- data/bin/commands/reset.rb +3 -3
- data/docs/doc/Array.html +2 -2
- data/docs/doc/BooleanTermParser/Clause.html +2 -2
- data/docs/doc/BooleanTermParser/Operator.html +2 -2
- data/docs/doc/BooleanTermParser/Query.html +2 -2
- data/docs/doc/BooleanTermParser/QueryParser.html +2 -2
- data/docs/doc/BooleanTermParser/QueryTransformer.html +2 -2
- data/docs/doc/BooleanTermParser.html +2 -2
- data/docs/doc/Doing/ArrayCleanup.html +2 -2
- data/docs/doc/Doing/ArrayNestedHash.html +2 -2
- data/docs/doc/Doing/ArrayTags.html +2 -2
- data/docs/doc/Doing/ByDayExport.html +2 -2
- data/docs/doc/Doing/CSVExport.html +2 -2
- data/docs/doc/Doing/CalendarImport.html +2 -2
- data/docs/doc/Doing/Change.html +2 -2
- data/docs/doc/Doing/Changes.html +2 -2
- data/docs/doc/Doing/ChronifyArray.html +2 -2
- data/docs/doc/Doing/ChronifyNumeric.html +2 -2
- data/docs/doc/Doing/ChronifyString.html +2 -2
- data/docs/doc/Doing/Color.html +2 -2
- data/docs/doc/Doing/Completion/BashCompletions.html +2 -2
- data/docs/doc/Doing/Completion/FigCompletions.html +2 -2
- data/docs/doc/Doing/Completion/FishCompletions.html +2 -2
- data/docs/doc/Doing/Completion/StringUtils.html +2 -2
- data/docs/doc/Doing/Completion/ZshCompletions.html +2 -2
- data/docs/doc/Doing/Completion.html +2 -2
- data/docs/doc/Doing/Configuration.html +2 -2
- data/docs/doc/Doing/DayOneRenderer.html +2 -2
- data/docs/doc/Doing/DayoneExport.html +2 -2
- data/docs/doc/Doing/DoingExport.html +2 -2
- data/docs/doc/Doing/DoingImport.html +2 -2
- data/docs/doc/Doing/Entry.html +2 -2
- data/docs/doc/Doing/Errors/DoingNoTraceError.html +2 -2
- data/docs/doc/Doing/Errors/DoingRuntimeError.html +2 -2
- data/docs/doc/Doing/Errors/DoingStandardError.html +2 -2
- data/docs/doc/Doing/Errors/EmptyInput.html +2 -2
- data/docs/doc/Doing/Errors/HistoryLimitError.html +2 -2
- data/docs/doc/Doing/Errors/InvalidPlugin.html +2 -2
- data/docs/doc/Doing/Errors/MissingBackupFile.html +2 -2
- data/docs/doc/Doing/Errors/NoResults.html +2 -2
- data/docs/doc/Doing/Errors/PluginException.html +2 -2
- data/docs/doc/Doing/Errors/UserCancelled.html +2 -2
- data/docs/doc/Doing/Errors/WrongCommand.html +2 -2
- data/docs/doc/Doing/Errors.html +2 -2
- data/docs/doc/Doing/HTMLExport.html +2 -2
- data/docs/doc/Doing/Hooks.html +2 -2
- data/docs/doc/Doing/Item.html +2 -2
- data/docs/doc/Doing/ItemDates.html +2 -2
- data/docs/doc/Doing/ItemQuery.html +2 -2
- data/docs/doc/Doing/ItemState.html +2 -2
- data/docs/doc/Doing/ItemTags.html +2 -2
- data/docs/doc/Doing/Items.html +2 -2
- data/docs/doc/Doing/JSONExport.html +2 -2
- data/docs/doc/Doing/JSONImport.html +2 -2
- data/docs/doc/Doing/Logger.html +2 -2
- data/docs/doc/Doing/MarkdownExport.html +2 -2
- data/docs/doc/Doing/Note.html +2 -2
- data/docs/doc/Doing/Pager.html +2 -2
- data/docs/doc/Doing/Plugins.html +2 -2
- data/docs/doc/Doing/Prompt.html +2 -2
- data/docs/doc/Doing/PromptChoose.html +2 -2
- data/docs/doc/Doing/PromptFZF.html +2 -2
- data/docs/doc/Doing/PromptInput.html +2 -2
- data/docs/doc/Doing/PromptSTD.html +2 -2
- data/docs/doc/Doing/PromptYN.html +2 -2
- data/docs/doc/Doing/Section.html +2 -2
- data/docs/doc/Doing/StringHighlight.html +2 -2
- data/docs/doc/Doing/StringNormalize.html +2 -2
- data/docs/doc/Doing/StringQuery.html +2 -2
- data/docs/doc/Doing/StringTags.html +2 -2
- data/docs/doc/Doing/StringTransform.html +2 -2
- data/docs/doc/Doing/StringTruncate.html +2 -2
- data/docs/doc/Doing/StringURL.html +2 -2
- data/docs/doc/Doing/SymbolNormalize.html +2 -2
- data/docs/doc/Doing/TaskPaperExport.html +2 -2
- data/docs/doc/Doing/TemplateExport.html +2 -2
- data/docs/doc/Doing/TemplateString.html +2 -2
- data/docs/doc/Doing/TimingImport.html +2 -2
- data/docs/doc/Doing/Types.html +2 -2
- data/docs/doc/Doing/Util/Backup.html +2 -2
- data/docs/doc/Doing/Util.html +2 -2
- data/docs/doc/Doing/Version.html +2 -2
- data/docs/doc/Doing/WWID.html +2 -2
- data/docs/doc/Doing.html +3 -3
- data/docs/doc/FalseClass.html +2 -2
- data/docs/doc/GLI/Commands/Help.html +2 -2
- data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +2 -2
- data/docs/doc/GLI/Commands.html +2 -2
- data/docs/doc/GLI.html +2 -2
- data/docs/doc/Hash.html +2 -2
- data/docs/doc/Numeric.html +2 -2
- data/docs/doc/Object.html +2 -2
- data/docs/doc/PhraseParser/Operator.html +2 -2
- data/docs/doc/PhraseParser/PhraseClause.html +2 -2
- data/docs/doc/PhraseParser/Query.html +2 -2
- data/docs/doc/PhraseParser/QueryParser.html +2 -2
- data/docs/doc/PhraseParser/QueryTransformer.html +2 -2
- data/docs/doc/PhraseParser/TermClause.html +2 -2
- data/docs/doc/PhraseParser.html +2 -2
- data/docs/doc/Status.html +2 -2
- data/docs/doc/String.html +2 -2
- data/docs/doc/Symbol.html +2 -2
- data/docs/doc/Time.html +2 -2
- data/docs/doc/TrueClass.html +2 -2
- data/docs/doc/_index.html +2 -2
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/top-level-namespace.html +2 -2
- data/doing.rdoc +1 -1
- data/lib/doing/chronify/string.rb +3 -3
- data/lib/doing/prompt/input.rb +8 -4
- data/lib/doing/prompt/yn.rb +2 -2
- data/lib/doing/version.rb +1 -1
- data/lib/doing.rb +7 -1
- metadata +1 -1
data/docs/doc/GLI.html
CHANGED
|
@@ -107,9 +107,9 @@
|
|
|
107
107
|
</div>
|
|
108
108
|
|
|
109
109
|
<div id="footer">
|
|
110
|
-
Generated on Sat
|
|
110
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
111
111
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
112
|
-
0.9.38 (ruby-
|
|
112
|
+
0.9.38 (ruby-4.0.1).
|
|
113
113
|
</div>
|
|
114
114
|
|
|
115
115
|
</div>
|
data/docs/doc/Hash.html
CHANGED
|
@@ -1000,9 +1000,9 @@ keys are symbols</p>
|
|
|
1000
1000
|
</div>
|
|
1001
1001
|
|
|
1002
1002
|
<div id="footer">
|
|
1003
|
-
Generated on Sat
|
|
1003
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
1004
1004
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1005
|
-
0.9.38 (ruby-
|
|
1005
|
+
0.9.38 (ruby-4.0.1).
|
|
1006
1006
|
</div>
|
|
1007
1007
|
|
|
1008
1008
|
</div>
|
data/docs/doc/Numeric.html
CHANGED
|
@@ -214,9 +214,9 @@
|
|
|
214
214
|
</div>
|
|
215
215
|
|
|
216
216
|
<div id="footer">
|
|
217
|
-
Generated on Sat
|
|
217
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
218
218
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
219
|
-
0.9.38 (ruby-
|
|
219
|
+
0.9.38 (ruby-4.0.1).
|
|
220
220
|
</div>
|
|
221
221
|
|
|
222
222
|
</div>
|
data/docs/doc/Object.html
CHANGED
|
@@ -193,9 +193,9 @@ has content</p>
|
|
|
193
193
|
</div>
|
|
194
194
|
|
|
195
195
|
<div id="footer">
|
|
196
|
-
Generated on Sat
|
|
196
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
197
197
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
198
|
-
0.9.38 (ruby-
|
|
198
|
+
0.9.38 (ruby-4.0.1).
|
|
199
199
|
</div>
|
|
200
200
|
|
|
201
201
|
</div>
|
|
@@ -172,9 +172,9 @@
|
|
|
172
172
|
</div>
|
|
173
173
|
|
|
174
174
|
<div id="footer">
|
|
175
|
-
Generated on Sat
|
|
175
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
176
176
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
177
|
-
0.9.38 (ruby-
|
|
177
|
+
0.9.38 (ruby-4.0.1).
|
|
178
178
|
</div>
|
|
179
179
|
|
|
180
180
|
</div>
|
|
@@ -293,9 +293,9 @@
|
|
|
293
293
|
</div>
|
|
294
294
|
|
|
295
295
|
<div id="footer">
|
|
296
|
-
Generated on Sat
|
|
296
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
297
297
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
298
|
-
0.9.38 (ruby-
|
|
298
|
+
0.9.38 (ruby-4.0.1).
|
|
299
299
|
</div>
|
|
300
300
|
|
|
301
301
|
</div>
|
|
@@ -485,9 +485,9 @@
|
|
|
485
485
|
</div>
|
|
486
486
|
|
|
487
487
|
<div id="footer">
|
|
488
|
-
Generated on Sat
|
|
488
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
489
489
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
490
|
-
0.9.38 (ruby-
|
|
490
|
+
0.9.38 (ruby-4.0.1).
|
|
491
491
|
</div>
|
|
492
492
|
|
|
493
493
|
</div>
|
|
@@ -142,9 +142,9 @@ A phrase clause generates an Elasticsearch match_phrase query.</p>
|
|
|
142
142
|
</div>
|
|
143
143
|
|
|
144
144
|
<div id="footer">
|
|
145
|
-
Generated on Sat
|
|
145
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
146
146
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
147
|
-
0.9.38 (ruby-
|
|
147
|
+
0.9.38 (ruby-4.0.1).
|
|
148
148
|
</div>
|
|
149
149
|
|
|
150
150
|
</div>
|
|
@@ -124,9 +124,9 @@
|
|
|
124
124
|
</div>
|
|
125
125
|
|
|
126
126
|
<div id="footer">
|
|
127
|
-
Generated on Sat
|
|
127
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
128
128
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
129
|
-
0.9.38 (ruby-
|
|
129
|
+
0.9.38 (ruby-4.0.1).
|
|
130
130
|
</div>
|
|
131
131
|
|
|
132
132
|
</div>
|
|
@@ -293,9 +293,9 @@
|
|
|
293
293
|
</div>
|
|
294
294
|
|
|
295
295
|
<div id="footer">
|
|
296
|
-
Generated on Sat
|
|
296
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
297
297
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
298
|
-
0.9.38 (ruby-
|
|
298
|
+
0.9.38 (ruby-4.0.1).
|
|
299
299
|
</div>
|
|
300
300
|
|
|
301
301
|
</div>
|
data/docs/doc/PhraseParser.html
CHANGED
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
</div>
|
|
106
106
|
|
|
107
107
|
<div id="footer">
|
|
108
|
-
Generated on Sat
|
|
108
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
109
109
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
110
|
-
0.9.38 (ruby-
|
|
110
|
+
0.9.38 (ruby-4.0.1).
|
|
111
111
|
</div>
|
|
112
112
|
|
|
113
113
|
</div>
|
data/docs/doc/Status.html
CHANGED
|
@@ -316,9 +316,9 @@
|
|
|
316
316
|
</div>
|
|
317
317
|
|
|
318
318
|
<div id="footer">
|
|
319
|
-
Generated on Sat
|
|
319
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
320
320
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
321
|
-
0.9.38 (ruby-
|
|
321
|
+
0.9.38 (ruby-4.0.1).
|
|
322
322
|
</div>
|
|
323
323
|
|
|
324
324
|
</div>
|
data/docs/doc/String.html
CHANGED
|
@@ -725,9 +725,9 @@ be recognized, e.g. %greensomething still finds
|
|
|
725
725
|
</div>
|
|
726
726
|
|
|
727
727
|
<div id="footer">
|
|
728
|
-
Generated on Sat
|
|
728
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
729
729
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
730
|
-
0.9.38 (ruby-
|
|
730
|
+
0.9.38 (ruby-4.0.1).
|
|
731
731
|
</div>
|
|
732
732
|
|
|
733
733
|
</div>
|
data/docs/doc/Symbol.html
CHANGED
|
@@ -127,9 +127,9 @@
|
|
|
127
127
|
</div>
|
|
128
128
|
|
|
129
129
|
<div id="footer">
|
|
130
|
-
Generated on Sat
|
|
130
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
131
131
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
132
|
-
0.9.38 (ruby-
|
|
132
|
+
0.9.38 (ruby-4.0.1).
|
|
133
133
|
</div>
|
|
134
134
|
|
|
135
135
|
</div>
|
data/docs/doc/Time.html
CHANGED
|
@@ -411,9 +411,9 @@ entries get month/day/year/time</p>
|
|
|
411
411
|
</div>
|
|
412
412
|
|
|
413
413
|
<div id="footer">
|
|
414
|
-
Generated on Sat
|
|
414
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
415
415
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
416
|
-
0.9.38 (ruby-
|
|
416
|
+
0.9.38 (ruby-4.0.1).
|
|
417
417
|
</div>
|
|
418
418
|
|
|
419
419
|
</div>
|
data/docs/doc/TrueClass.html
CHANGED
|
@@ -235,9 +235,9 @@ has content</p>
|
|
|
235
235
|
</div>
|
|
236
236
|
|
|
237
237
|
<div id="footer">
|
|
238
|
-
Generated on Sat
|
|
238
|
+
Generated on Sat Mar 21 04:13:33 2026 by
|
|
239
239
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
240
|
-
0.9.38 (ruby-
|
|
240
|
+
0.9.38 (ruby-4.0.1).
|
|
241
241
|
</div>
|
|
242
242
|
|
|
243
243
|
</div>
|
data/docs/doc/_index.html
CHANGED
|
@@ -961,9 +961,9 @@
|
|
|
961
961
|
</div>
|
|
962
962
|
|
|
963
963
|
<div id="footer">
|
|
964
|
-
Generated on Sat
|
|
964
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
965
965
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
966
|
-
0.9.38 (ruby-
|
|
966
|
+
0.9.38 (ruby-4.0.1).
|
|
967
967
|
</div>
|
|
968
968
|
|
|
969
969
|
</div>
|
data/docs/doc/file.README.html
CHANGED
|
@@ -153,9 +153,9 @@ with changes. Please target the <code>develop</code> branch with pull requests.<
|
|
|
153
153
|
</div></div>
|
|
154
154
|
|
|
155
155
|
<div id="footer">
|
|
156
|
-
Generated on Sat
|
|
156
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
157
157
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
158
|
-
0.9.38 (ruby-
|
|
158
|
+
0.9.38 (ruby-4.0.1).
|
|
159
159
|
</div>
|
|
160
160
|
|
|
161
161
|
</div>
|
data/docs/doc/index.html
CHANGED
|
@@ -153,9 +153,9 @@ with changes. Please target the <code>develop</code> branch with pull requests.<
|
|
|
153
153
|
</div></div>
|
|
154
154
|
|
|
155
155
|
<div id="footer">
|
|
156
|
-
Generated on Sat
|
|
156
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
157
157
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
158
|
-
0.9.38 (ruby-
|
|
158
|
+
0.9.38 (ruby-4.0.1).
|
|
159
159
|
</div>
|
|
160
160
|
|
|
161
161
|
</div>
|
|
@@ -216,9 +216,9 @@
|
|
|
216
216
|
</div>
|
|
217
217
|
|
|
218
218
|
<div id="footer">
|
|
219
|
-
Generated on Sat
|
|
219
|
+
Generated on Sat Mar 21 04:13:32 2026 by
|
|
220
220
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
221
|
-
0.9.38 (ruby-
|
|
221
|
+
0.9.38 (ruby-4.0.1).
|
|
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.
|
|
8
|
+
v2.1.99
|
|
9
9
|
|
|
10
10
|
=== Global Options
|
|
11
11
|
=== --config_file arg
|
|
@@ -178,7 +178,7 @@ module Doing
|
|
|
178
178
|
## "mon 3pm to mon 5pm".split_date_range
|
|
179
179
|
##
|
|
180
180
|
def split_date_range
|
|
181
|
-
time_rx = /^(\d{1,2}(:\d{1,2})?( *(am|pm))?|midnight|noon)$/
|
|
181
|
+
time_rx = /^(\d{1,2}(:\d{1,2})?( *(am|pm))?|midnight|noon)$/i
|
|
182
182
|
range_rx = / (to|through|thru|(?:un)?til|-+) /
|
|
183
183
|
|
|
184
184
|
date_string = dup
|
|
@@ -191,8 +191,8 @@ module Doing
|
|
|
191
191
|
dates = date_string.split(range_rx)
|
|
192
192
|
|
|
193
193
|
if dates[0].strip =~ time_rx && dates[-1].strip =~ time_rx
|
|
194
|
-
start = dates[0].strip
|
|
195
|
-
finish = dates[-1].strip
|
|
194
|
+
start = dates[0].strip.sub(/^today +/i, '')
|
|
195
|
+
finish = dates[-1].strip.sub(/^today +/i, '')
|
|
196
196
|
else
|
|
197
197
|
start = dates[0].chronify(guess: :begin, future: false)
|
|
198
198
|
finish = dates[-1].chronify(guess: inclusive ? :end : :begin, future: true)
|
data/lib/doing/prompt/input.rb
CHANGED
|
@@ -17,9 +17,10 @@ module Doing
|
|
|
17
17
|
## @deprecated Use {#read_line} instead
|
|
18
18
|
##
|
|
19
19
|
def enter_text(prompt, default_response: '')
|
|
20
|
-
$stdin.reopen('/dev/tty')
|
|
21
20
|
return default_response if @default_answer
|
|
22
21
|
|
|
22
|
+
$stdin.reopen('/dev/tty')
|
|
23
|
+
|
|
23
24
|
print "#{Color.yellow(prompt).sub(/:?$/, ':')} #{Color.reset}"
|
|
24
25
|
$stdin.gets.strip
|
|
25
26
|
end
|
|
@@ -39,9 +40,10 @@ module Doing
|
|
|
39
40
|
## @return [String] User input string
|
|
40
41
|
##
|
|
41
42
|
def read_line(prompt: 'Enter text', completions: [], default_response: '')
|
|
42
|
-
$stdin.reopen('/dev/tty')
|
|
43
43
|
return default_response if @default_answer
|
|
44
44
|
|
|
45
|
+
$stdin.reopen('/dev/tty')
|
|
46
|
+
|
|
45
47
|
unless completions.empty?
|
|
46
48
|
completions.sort!
|
|
47
49
|
comp = proc { |s| completions.grep(/^#{Regexp.escape(s)}/) }
|
|
@@ -71,9 +73,10 @@ module Doing
|
|
|
71
73
|
## @return [String] Multi-line result, joined with newlines
|
|
72
74
|
##
|
|
73
75
|
def read_lines(prompt: 'Enter text', completions: [], default_response: '')
|
|
74
|
-
$stdin.reopen('/dev/tty')
|
|
75
76
|
return default_response if @default_answer
|
|
76
77
|
|
|
78
|
+
$stdin.reopen('/dev/tty')
|
|
79
|
+
|
|
77
80
|
completions.sort!
|
|
78
81
|
comp = proc { |s| completions.grep(/^#{Regexp.escape(s)}/) }
|
|
79
82
|
Readline.completion_append_character = ' '
|
|
@@ -111,9 +114,10 @@ module Doing
|
|
|
111
114
|
##
|
|
112
115
|
## @deprecated Use {#read_lines} instead
|
|
113
116
|
def request_lines(prompt: 'Enter text', default_response: '')
|
|
114
|
-
$stdin.reopen('/dev/tty')
|
|
115
117
|
return default_response if @default_answer
|
|
116
118
|
|
|
119
|
+
$stdin.reopen('/dev/tty')
|
|
120
|
+
|
|
117
121
|
ask_note = []
|
|
118
122
|
reader = TTY::Reader.new(interrupt: -> { raise Errors::UserCancelled }, track_history: false)
|
|
119
123
|
puts "#{Color.boldgreen(prompt.sub(/:?$/,
|
data/lib/doing/prompt/yn.rb
CHANGED
|
@@ -16,8 +16,6 @@ module Doing
|
|
|
16
16
|
def yn(question, default_response: false)
|
|
17
17
|
return @force_answer == :yes unless @force_answer.nil?
|
|
18
18
|
|
|
19
|
-
$stdin.reopen('/dev/tty')
|
|
20
|
-
|
|
21
19
|
default = if default_response.is_a?(String)
|
|
22
20
|
default_response =~ /y/i ? true : false
|
|
23
21
|
else
|
|
@@ -30,6 +28,8 @@ module Doing
|
|
|
30
28
|
# if this isn't an interactive shell, answer default
|
|
31
29
|
return default unless $stdout.isatty
|
|
32
30
|
|
|
31
|
+
$stdin.reopen('/dev/tty')
|
|
32
|
+
|
|
33
33
|
# clear the buffer
|
|
34
34
|
ARGV.length&.times do
|
|
35
35
|
ARGV.shift
|
data/lib/doing/version.rb
CHANGED
data/lib/doing.rb
CHANGED
|
@@ -9,7 +9,13 @@ require 'tempfile'
|
|
|
9
9
|
require 'zlib'
|
|
10
10
|
require 'base64'
|
|
11
11
|
require 'plist'
|
|
12
|
-
|
|
12
|
+
begin
|
|
13
|
+
require 'readline'
|
|
14
|
+
rescue LoadError
|
|
15
|
+
# Ruby 4 builds may not ship native readline; use stdlib Reline API-compatible fallback.
|
|
16
|
+
require 'reline'
|
|
17
|
+
Readline = Reline unless defined?(Readline)
|
|
18
|
+
end
|
|
13
19
|
require 'haml'
|
|
14
20
|
require 'json'
|
|
15
21
|
require 'logger'
|