doing 2.1.85 → 2.1.86
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +3 -3
- data/README.md +1 -1
- data/docs/doc/Array.html +1 -1
- data/docs/doc/BooleanTermParser/Clause.html +1 -1
- data/docs/doc/BooleanTermParser/Operator.html +1 -1
- data/docs/doc/BooleanTermParser/Query.html +1 -1
- data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
- data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
- data/docs/doc/BooleanTermParser.html +1 -1
- data/docs/doc/Doing/ArrayCleanup.html +1 -1
- data/docs/doc/Doing/ArrayNestedHash.html +1 -1
- data/docs/doc/Doing/ArrayTags.html +1 -1
- data/docs/doc/Doing/ByDayExport.html +1 -1
- data/docs/doc/Doing/CSVExport.html +1 -1
- data/docs/doc/Doing/CalendarImport.html +1 -1
- data/docs/doc/Doing/Change.html +1 -1
- data/docs/doc/Doing/Changes.html +1 -1
- data/docs/doc/Doing/ChronifyArray.html +1 -1
- data/docs/doc/Doing/ChronifyNumeric.html +1 -1
- data/docs/doc/Doing/ChronifyString.html +1 -1
- data/docs/doc/Doing/Color.html +1 -1
- data/docs/doc/Doing/Completion/BashCompletions.html +1 -1
- data/docs/doc/Doing/Completion/FigCompletions.html +1 -1
- data/docs/doc/Doing/Completion/FishCompletions.html +1 -1
- data/docs/doc/Doing/Completion/StringUtils.html +1 -1
- data/docs/doc/Doing/Completion/ZshCompletions.html +1 -1
- data/docs/doc/Doing/Completion.html +1 -1
- data/docs/doc/Doing/Configuration.html +1 -1
- data/docs/doc/Doing/DayOneRenderer.html +1 -1
- data/docs/doc/Doing/DayoneExport.html +1 -1
- data/docs/doc/Doing/DoingExport.html +1 -1
- data/docs/doc/Doing/DoingImport.html +1 -1
- data/docs/doc/Doing/Entry.html +1 -1
- data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
- data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
- data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
- data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
- data/docs/doc/Doing/Errors/HistoryLimitError.html +1 -1
- data/docs/doc/Doing/Errors/InvalidPlugin.html +1 -1
- data/docs/doc/Doing/Errors/MissingBackupFile.html +1 -1
- data/docs/doc/Doing/Errors/NoResults.html +1 -1
- data/docs/doc/Doing/Errors/PluginException.html +1 -1
- data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
- data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
- data/docs/doc/Doing/Errors.html +1 -1
- data/docs/doc/Doing/HTMLExport.html +1 -1
- data/docs/doc/Doing/Hooks.html +1 -1
- data/docs/doc/Doing/Item.html +1 -1
- data/docs/doc/Doing/ItemDates.html +1 -1
- data/docs/doc/Doing/ItemQuery.html +1 -1
- data/docs/doc/Doing/ItemState.html +1 -1
- data/docs/doc/Doing/ItemTags.html +1 -1
- data/docs/doc/Doing/Items.html +1 -1
- data/docs/doc/Doing/JSONExport.html +1 -1
- data/docs/doc/Doing/JSONImport.html +1 -1
- data/docs/doc/Doing/Logger.html +1 -1
- data/docs/doc/Doing/MarkdownExport.html +1 -1
- data/docs/doc/Doing/Note.html +1 -1
- data/docs/doc/Doing/Pager.html +1 -1
- data/docs/doc/Doing/Plugins.html +1 -1
- data/docs/doc/Doing/Prompt.html +1 -1
- data/docs/doc/Doing/PromptChoose.html +1 -1
- data/docs/doc/Doing/PromptFZF.html +1 -1
- data/docs/doc/Doing/PromptInput.html +1 -1
- data/docs/doc/Doing/PromptSTD.html +1 -1
- data/docs/doc/Doing/PromptYN.html +1 -1
- data/docs/doc/Doing/Section.html +1 -1
- data/docs/doc/Doing/StringHighlight.html +1 -1
- data/docs/doc/Doing/StringNormalize.html +1 -1
- data/docs/doc/Doing/StringQuery.html +1 -1
- data/docs/doc/Doing/StringTags.html +1 -1
- data/docs/doc/Doing/StringTransform.html +1 -1
- data/docs/doc/Doing/StringTruncate.html +1 -1
- data/docs/doc/Doing/StringURL.html +1 -1
- data/docs/doc/Doing/SymbolNormalize.html +1 -1
- data/docs/doc/Doing/TaskPaperExport.html +1 -1
- data/docs/doc/Doing/TemplateExport.html +1 -1
- data/docs/doc/Doing/TemplateString.html +1 -1
- data/docs/doc/Doing/TimingImport.html +1 -1
- data/docs/doc/Doing/Types.html +1 -1
- data/docs/doc/Doing/Util/Backup.html +1 -1
- data/docs/doc/Doing/Util.html +1 -1
- data/docs/doc/Doing/Version.html +1 -1
- data/docs/doc/Doing/WWID.html +1 -1
- data/docs/doc/Doing.html +2 -2
- data/docs/doc/FalseClass.html +1 -1
- data/docs/doc/GLI/Commands/Help.html +1 -1
- data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
- data/docs/doc/GLI/Commands.html +1 -1
- data/docs/doc/GLI.html +1 -1
- data/docs/doc/Hash.html +1 -1
- data/docs/doc/Numeric.html +1 -1
- data/docs/doc/Object.html +1 -1
- data/docs/doc/PhraseParser/Operator.html +1 -1
- data/docs/doc/PhraseParser/PhraseClause.html +1 -1
- data/docs/doc/PhraseParser/Query.html +1 -1
- data/docs/doc/PhraseParser/QueryParser.html +1 -1
- data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
- data/docs/doc/PhraseParser/TermClause.html +1 -1
- data/docs/doc/PhraseParser.html +1 -1
- data/docs/doc/Status.html +1 -1
- data/docs/doc/String.html +1 -1
- data/docs/doc/Symbol.html +1 -1
- data/docs/doc/Time.html +1 -1
- data/docs/doc/TrueClass.html +1 -1
- data/docs/doc/_index.html +1 -1
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/top-level-namespace.html +1 -1
- data/doing.rdoc +23 -1
- data/lib/completion/_doing.zsh +4 -0
- data/lib/completion/doing.bash +11 -0
- data/lib/completion/doing.fish +4 -0
- data/lib/completion/doing.ts +30 -0
- data/lib/doing/chronify/string.rb +5 -3
- data/lib/doing/version.rb +1 -1
- metadata +1 -1
data/lib/completion/doing.bash
CHANGED
@@ -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
|
data/lib/completion/doing.fish
CHANGED
@@ -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
|
data/lib/completion/doing.ts
CHANGED
@@ -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 =
|
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:',
|
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:',
|
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