doing 2.1.47 → 2.1.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/bin/commands/completion.rb +1 -1
- data/bin/commands/now.rb +2 -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/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/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 +5 -5
- 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 +206 -0
- 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 +2 -2
- data/docs/doc/Doing/Version.html +1 -1
- data/docs/doc/Doing/WWID.html +1 -1
- data/docs/doc/Doing.html +3 -3
- 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 +2 -2
- 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 +12 -5
- data/docs/doc/class_list.html +1 -1
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/method_list.html +682 -626
- data/docs/doc/top-level-namespace.html +1 -1
- data/doing.rdoc +2 -2
- data/lib/completion/_doing.zsh +31 -31
- data/lib/doing/completion/fig_completion.rb +121 -0
- data/lib/doing/completion.rb +14 -4
- data/lib/doing/plugins/export/doing_export.rb +0 -2
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid/interactive.rb +2 -1
- data/lib/doing/wwid/modify.rb +6 -9
- metadata +4 -2
@@ -216,7 +216,7 @@
|
|
216
216
|
</div>
|
217
217
|
|
218
218
|
<div id="footer">
|
219
|
-
Generated on
|
219
|
+
Generated on Wed May 11 10:25:19 2022 by
|
220
220
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
221
221
|
0.9.27 (ruby-3.0.1).
|
222
222
|
</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.48
|
9
9
|
|
10
10
|
=== Global Options
|
11
11
|
=== --config_file arg
|
@@ -524,7 +524,7 @@ so typing 'doing' and hitting tab will offer completions of subcommands and thei
|
|
524
524
|
Deprecated, specify shell as argument to subcommand
|
525
525
|
|
526
526
|
[Default Value] None
|
527
|
-
[Must Match] (?i-mx:^(?:[bzf](?:[ai]?sh)?|all)$)
|
527
|
+
[Must Match] (?i-mx:^(?:[bzf](?:[ai]?sh)?|fig|all)$)
|
528
528
|
|
529
529
|
|
530
530
|
===== Commands
|
data/lib/completion/_doing.zsh
CHANGED
@@ -66,22 +66,22 @@ function _doing() {
|
|
66
66
|
|
67
67
|
case $line[1] in
|
68
68
|
again)
|
69
|
-
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string
|
69
|
+
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item to resume from a menu of matching entries]" "--in[Add new entry to section]:SECTION_NAME:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" "--not[Repeat items that *don't* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Get last entry from a specific section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
70
70
|
;;
|
71
71
|
resume)
|
72
|
-
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string
|
72
|
+
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item to resume from a menu of matching entries]" "--in[Add new entry to section]:SECTION_NAME:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" "--not[Repeat items that *don't* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Get last entry from a specific section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
73
73
|
;;
|
74
74
|
archive)
|
75
|
-
args=( "--after[Archive entries newer than date]:DATE_STRING:" "--before[Archive entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
75
|
+
args=( "--after[Archive entries newer than date]:DATE_STRING:" "--before[Archive entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep]:X:" "--label[Label moved items with @from(SECTION_NAME)]" "--not[Archive items that *don't* match search/tag filters]" "--search[Filter entries using a search query]:QUERY:" {'(--to)-t','(-t)--to'}"[Move entries to]:SECTION_NAME:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
76
76
|
;;
|
77
77
|
move)
|
78
|
-
args=( "--after[Archive entries newer than date]:DATE_STRING:" "--before[Archive entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
78
|
+
args=( "--after[Archive entries newer than date]:DATE_STRING:" "--before[Archive entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep]:X:" "--label[Label moved items with @from(SECTION_NAME)]" "--not[Archive items that *don't* match search/tag filters]" "--search[Filter entries using a search query]:QUERY:" {'(--to)-t','(-t)--to'}"[Move entries to]:SECTION_NAME:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
79
79
|
;;
|
80
80
|
autotag)
|
81
|
-
args=( "--bool[Boolean]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to autotag]:COUNT:" "--force[
|
81
|
+
args=( "--bool[Boolean]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to autotag]:COUNT:" "--force[Don't ask permission to autotag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to tag from a menu of matching entries]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Autotag entries matching search filter]:QUERY:" "--tag[Autotag the last X entries containing TAG]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Autotag last entry]" )
|
82
82
|
;;
|
83
83
|
cancel)
|
84
|
-
args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
84
|
+
args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to cancel from a menu of matching entries]" "--not[Cancel items that *don't* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Cancel last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
85
85
|
;;
|
86
86
|
changes)
|
87
87
|
args=( {'(--changes)-C','(-C)--changes'}"[Only output changes]" {'(--all)-a','(-a)--all'}"[Display all versions]" {'(--interactive)-i','(-i)--interactive'}"[Open changelog in interactive viewer]" {'(--lookup)-l','(-l)--lookup'}"[Look up a specific version]:VERSION:" "--markdown[Output raw Markdown]" "--only[Only show changes of type(s)]:TYPES:" {'(--prefix)-p','(-p)--prefix'}"[Include]" "--render[Force rendered output]" {'(--search)-s','(-s)--search'}"[Show changelogs matching search terms]:arg:" "--sort[Sort order]:ORDER:" )
|
@@ -102,49 +102,49 @@ function _doing() {
|
|
102
102
|
args=( {'(--dump)-d','(-d)--dump'}"[DEPRECATED]" {'(--update)-u','(-u)--update'}"[DEPRECATED]" )
|
103
103
|
;;
|
104
104
|
done)
|
105
|
-
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Immediately archive the entry]" "--ask[Prompt for note via multi-line input]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--started[Backdate start date for new entry to date string
|
105
|
+
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Immediately archive the entry]" "--ask[Prompt for note via multi-line input]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--date[Include date]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--for[Set completion date to start date plus interval]:INTERVAL:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry not already marked @done]" )
|
106
106
|
;;
|
107
107
|
did)
|
108
|
-
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Immediately archive the entry]" "--ask[Prompt for note via multi-line input]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--started[Backdate start date for new entry to date string
|
108
|
+
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Immediately archive the entry]" "--ask[Prompt for note via multi-line input]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--date[Include date]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--for[Set completion date to start date plus interval]:INTERVAL:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry not already marked @done]" )
|
109
109
|
;;
|
110
110
|
finish)
|
111
|
-
args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--auto[Auto-generate finish dates from next
|
111
|
+
args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--auto[Auto-generate finish dates from next entry's start time]" "--started[Backdate completed date to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--date[Include date]" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to finish from a menu of matching entries]" "--not[Finish items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove @done tag]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Finish last entry]" "--update[Overwrite existing @done tag with new date]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
112
112
|
;;
|
113
113
|
grep)
|
114
|
-
args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
114
|
+
args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--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 matching entries]" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Display an interactive menu of results to perform further operations]" "--not[Search items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact string matching]" )
|
115
115
|
;;
|
116
116
|
search)
|
117
|
-
args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
117
|
+
args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--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 matching entries]" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Display an interactive menu of results to perform further operations]" "--not[Search items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact string matching]" )
|
118
118
|
;;
|
119
119
|
help)
|
120
120
|
args=( )
|
121
121
|
;;
|
122
122
|
import)
|
123
|
-
args=( "--after[Import entries newer than date]:DATE_STRING:" "--autotag[Autotag entries]" "--before[Import entries older than date]:DATE_STRING:" "--case[Case sensitivity for search string matching (
|
123
|
+
args=( "--after[Import entries newer than date]:DATE_STRING:" "--autotag[Autotag entries]" "--before[Import entries older than date]:DATE_STRING:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Date range]:DATE_OR_RANGE:" "--not[Import items that *don't* match search/tag/date filters]" "--only_timed[Only import items with recorded time intervals]" "--overlap[Allow entries that overlap existing times]" "--prefix[Prefix entries with]:PREFIX:" {'(--section)-s','(-s)--section'}"[Target section]:NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--tag)-t','(-t)--tag'}"[Tag all imported entries]:TAGS:" "--type[Import type]:TYPE:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
124
124
|
;;
|
125
125
|
last)
|
126
|
-
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
126
|
+
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]" )
|
127
127
|
;;
|
128
128
|
mark)
|
129
|
-
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 (
|
129
|
+
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]" )
|
130
130
|
;;
|
131
131
|
flag)
|
132
|
-
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 (
|
132
|
+
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]" )
|
133
133
|
;;
|
134
134
|
meanwhile)
|
135
|
-
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Archive previous @meanwhile entry]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string
|
135
|
+
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" {'(--archive)-a','(-a)--archive'}"[Archive previous @meanwhile entry]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
|
136
136
|
;;
|
137
137
|
note)
|
138
|
-
args=( "--ask[Prompt for note via multi-line input]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
138
|
+
args=( "--ask[Prompt for note via multi-line input]" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--interactive)-i','(-i)--interactive'}"[Select item for new note from a menu of matching entries]" "--not[Note items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Replace/Remove last entry's note]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
139
139
|
;;
|
140
140
|
now)
|
141
|
-
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string
|
141
|
+
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--finish_last)-f','(-f)--finish_last'}"[Timed entry]" "--from[Set a start and optionally end time as a date range]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
|
142
142
|
;;
|
143
143
|
next)
|
144
|
-
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string
|
144
|
+
args=( {'(--noauto)-X','(-X)--noauto'}"[Exclude auto tags and default tags]" "--ask[Prompt for note via multi-line input]" "--started[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--finish_last)-f','(-f)--finish_last'}"[Timed entry]" "--from[Set a start and optionally end time as a date range]:TIME_RANGE:" {'(--note)-n','(-n)--note'}"[Include a note]:TEXT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" )
|
145
145
|
;;
|
146
146
|
on)
|
147
|
-
args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
147
|
+
args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--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:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing on --from \"12pm to 4pm\"`]:TIME_RANGE:" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
148
148
|
;;
|
149
149
|
open)
|
150
150
|
args=( {'(--app)-a','(-a)--app'}"[Open with app name]:APP_NAME:" {'(--bundle_id)-b','(-b)--bundle_id'}"[Open with app bundle id]:BUNDLE_ID:" {'(--editor)-e','(-e)--editor'}"[Open with editor command]:COMMAND:" )
|
@@ -159,34 +159,34 @@ function _doing() {
|
|
159
159
|
args=( {'(--file)-f','(-f)--file'}"[Specify alternate doing file]:PATH:" {'(--interactive)-i','(-i)--interactive'}"[Select from an interactive menu]" )
|
160
160
|
;;
|
161
161
|
reset)
|
162
|
-
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
162
|
+
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries]" "--not[Reset items that *don't* match search/tag filters]" {'(--resume)-r','(-r)--resume'}"[Resume entry]" {'(--section)-s','(-s)--section'}"[Limit search to section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
163
163
|
;;
|
164
164
|
begin)
|
165
|
-
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
165
|
+
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--from[Start and end times as a date/time range `doing done --from \"1am to 8am\"`]:TIME_RANGE:" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries]" "--not[Reset items that *don't* match search/tag filters]" {'(--resume)-r','(-r)--resume'}"[Resume entry]" {'(--section)-s','(-s)--section'}"[Limit search to section]:NAME:" "--search[Filter entries using a search query]:QUERY:" "--for[Set completion date to start date plus interval]:INTERVAL:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
166
166
|
;;
|
167
167
|
rotate)
|
168
|
-
args=( "--before[Rotate entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
168
|
+
args=( "--before[Rotate entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--keep)-k','(-k)--keep'}"[How many items to keep in each section]:X:" "--not[Rotate items that *don't* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Section to rotate]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
169
169
|
;;
|
170
170
|
sections)
|
171
171
|
args=( )
|
172
172
|
;;
|
173
173
|
select)
|
174
|
-
args=( {'(--archive)-a','(-a)--archive'}"[Archive selected items]" "--after[Select entries newer than date]:DATE_STRING:" "--resume[Copy selection as a new entry with current time and no @done tag]" "--before[Select entries older than date]:DATE_STRING:" {'(--cancel)-c','(-c)--cancel'}"[Cancel selected items]" "--case[Case sensitivity for search string matching (
|
174
|
+
args=( {'(--archive)-a','(-a)--archive'}"[Archive selected items]" "--after[Select entries newer than date]:DATE_STRING:" "--resume[Copy selection as a new entry with current time and no @done tag]" "--before[Select entries older than date]:DATE_STRING:" {'(--cancel)-c','(-c)--cancel'}"[Cancel selected items]" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--delete)-d','(-d)--delete'}"[Delete selected items]" {'(--editor)-e','(-e)--editor'}"[Edit selected item(s)]" {'(--finish)-f','(-f)--finish'}"[Add @done with current time to selected item(s)]" "--flag[Add flag to selected item(s)]" "--force[Perform action without confirmation]" "--from[Date range]:DATE_OR_RANGE:" {'(--move)-m','(-m)--move'}"[Move selected items to section]:SECTION:" "--menu[Use --no-menu to skip the interactive menu]" "--not[Select items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output entries to format]:FORMAT:" {'(--query)-q','(-q)--query'}"[Initial search query for filtering]:QUERY:" {'(--remove)-r','(-r)--remove'}"[Reverse -c]" {'(--section)-s','(-s)--section'}"[Select from a specific section]:SECTION:" "--save_to[Save selected entries to file using --output format]:FILE:" "--search[Filter entries using a search query]:QUERY:" {'(--tag)-t','(-t)--tag'}"[Tag selected entries]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
175
175
|
;;
|
176
176
|
show)
|
177
|
-
args=( {'(--age)-a','(-a)--age'}"[Age]:AGE:" "--after[Show entries newer than date]:DATE_STRING:" "--before[Show entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[Max count to show]:MAX:" "--case[Case sensitivity for search string matching (
|
177
|
+
args=( {'(--age)-a','(-a)--age'}"[Age]:AGE:" "--after[Show entries newer than date]:DATE_STRING:" "--before[Show entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[Max count to show]:MAX:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" {'(--editor)-e','(-e)--editor'}"[Edit matching entries with vim]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries to perform additional operations]" {'(--menu)-m','(-m)--menu'}"[Select section or tag to display from a menu]" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--sort)-s','(-s)--sort'}"[Sort order]:ORDER:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
178
178
|
;;
|
179
179
|
since)
|
180
|
-
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching (
|
180
|
+
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:" "--duration[Show elapsed time on entries without @done tag]" "--not[Since items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
181
181
|
;;
|
182
182
|
tag)
|
183
|
-
args=( {'(--autotag)-a','(-a)--autotag'}"[Autotag entries based on autotag configuration in ~/]" "--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 (
|
183
|
+
args=( {'(--autotag)-a','(-a)--autotag'}"[Autotag entries based on autotag configuration in ~/]" "--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 tag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to tag from a menu of matching entries]" "--not[Tag items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove given tag(s)]" "--regex[Interpret tag string as regular expression]" "--rename[Replace existing tag with tag argument]:ORIG_TAG:" {'(--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'}"[Tag last entry]" {'(--value)-v','(-v)--value'}"[Include a value]:VALUE:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
184
184
|
;;
|
185
185
|
tag_dir)
|
186
186
|
args=( "--clear[Remove all default_tags from the local]" {'(--editor)-e','(-e)--editor'}"[Use default editor to edit tag list]" {'(--remove)-r','(-r)--remove'}"[Delete tag(s) from the current list]" )
|
187
187
|
;;
|
188
188
|
tags)
|
189
|
-
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--counts)-c','(-c)--counts'}"[Show count of occurrences]" "--case[Case sensitivity for search string matching (
|
189
|
+
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--counts)-c','(-c)--counts'}"[Show count of occurrences]" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--interactive)-i','(-i)--interactive'}"[Select items to scan from a menu of matching entries]" {'(--line)-l','(-l)--line'}"[Output in a single line with @ symbols]" "--not[Show items that *don't* match search/tag filters]" {'(--order)-o','(-o)--order'}"[Sort order]:ORDER:" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--sort[Sort by name or count]:SORT_ORDER:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
190
190
|
;;
|
191
191
|
template)
|
192
192
|
args=( {'(--column)-c','(-c)--column'}"[List in single column for completion]" {'(--list)-l','(-l)--list'}"[List all available templates]" {'(--path)-p','(-p)--path'}"[Save template to alternate location]:DIRECTORY:" {'(--save)-s','(-s)--save'}"[Save template to file instead of STDOUT]" )
|
@@ -195,13 +195,13 @@ function _doing() {
|
|
195
195
|
args=( )
|
196
196
|
;;
|
197
197
|
today)
|
198
|
-
args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing today --from "12pm to 4pm"`]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" )
|
198
|
+
args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing today --from \"12pm to 4pm\"`]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" )
|
199
199
|
;;
|
200
200
|
undo)
|
201
201
|
args=( {'(--file)-f','(-f)--file'}"[Specify alternate doing file]:PATH:" {'(--interactive)-i','(-i)--interactive'}"[Select from recent backups]" {'(--prune)-p','(-p)--prune'}"[Remove old backups]:COUNT:" {'(--redo)-r','(-r)--redo'}"[Redo last undo]" )
|
202
202
|
;;
|
203
203
|
view)
|
204
|
-
args=( "--after[Show entries newer than date]:DATE_STRING:" "--age[Age]:AGE:" "--before[Show entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[Count to display]:COUNT:" "--case[Case sensitivity for search string matching (
|
204
|
+
args=( "--after[Show entries newer than date]:DATE_STRING:" "--age[Age]:AGE:" "--before[Show entries older than date]:DATE_STRING:" "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[Count to display]:COUNT:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--color[Include colors in output]" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Date range]:DATE_OR_RANGE:" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries to perform additional operations]" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" "--search[Filter entries using a search query]:QUERY:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag[Filter entries by tag]:TAG:" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--totals[Show intervals with totals at the end of output]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
205
205
|
;;
|
206
206
|
views)
|
207
207
|
args=( {'(--column)-c','(-c)--column'}"[List in single column]" {'(--editor)-e','(-e)--editor'}"[Open YAML for view in editor]" {'(--output)-o','(-o)--output'}"[Output/edit view in alternative format]:FORMAT:" {'(--remove)-r','(-r)--remove'}"[Delete view config]" )
|
@@ -210,7 +210,7 @@ function _doing() {
|
|
210
210
|
args=( "--after[Include entries newer than date]:DATE_STRING:" {'(--bool)-b','(-b)--bool'}"[Tag boolean]:BOOLEAN:" "--before[Include entries older than date]:DATE_STRING:" {'(--from)-f','(-f)--from'}"[Date range to include]:DATE_OR_RANGE:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section to rotate]:SECTION_NAME:" "--search[Search filter]:QUERY:" "--tag[Tag filter]:TAG:" )
|
211
211
|
;;
|
212
212
|
yesterday)
|
213
|
-
args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing yesterday --from "12pm to 4pm"`]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" )
|
213
|
+
args=( "--after[View entries after specified time]:TIME_STRING:" "--before[View entries before specified time]:TIME_STRING:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" "--from[Time range to show `doing yesterday --from \"12pm to 4pm\"`]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_order[Tag sort direction]:DIRECTION:" "--tag_sort[Sort tags by]:KEY:" "--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:" "--totals[Show time totals at the end of output]" )
|
214
214
|
;;
|
215
215
|
esac
|
216
216
|
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Doing
|
4
|
+
module Completion
|
5
|
+
class ::String
|
6
|
+
def sanitize
|
7
|
+
gsub(/"/, '\"')
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
# Generate completions for zsh
|
12
|
+
class FigCompletions
|
13
|
+
attr_accessor :commands, :global_options
|
14
|
+
|
15
|
+
def generate_helpers
|
16
|
+
out=<<~EOFUNCTIONS
|
17
|
+
const completionSpec: Fig.Spec = {
|
18
|
+
name: "doing",
|
19
|
+
description: "A CLI for a What Was I Doing system",
|
20
|
+
subcommands: [
|
21
|
+
#{generate_subcommand_completions.join("\n ")}
|
22
|
+
],
|
23
|
+
};
|
24
|
+
export default completionSpec;
|
25
|
+
EOFUNCTIONS
|
26
|
+
@bar.advance(status: '✅')
|
27
|
+
@bar.finish
|
28
|
+
out
|
29
|
+
end
|
30
|
+
|
31
|
+
def generate_subcommand_completions
|
32
|
+
out = []
|
33
|
+
indent = ' '
|
34
|
+
@commands.each do |cmd|
|
35
|
+
cmd[:commands].each do |c|
|
36
|
+
out << <<~EOCOMMAND
|
37
|
+
{
|
38
|
+
#{indent}name: "#{c}",
|
39
|
+
#{indent}description: "#{cmd[:description].sanitize}",
|
40
|
+
#{indent}#{generate_subcommand_option_completions(cmd)}
|
41
|
+
},
|
42
|
+
EOCOMMAND
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
out
|
47
|
+
end
|
48
|
+
|
49
|
+
def generate_subcommand_option_completions(cmd, indent: ' ')
|
50
|
+
out = []
|
51
|
+
|
52
|
+
@bar.advance(status: cmd[:commands].first)
|
53
|
+
|
54
|
+
data = Completion.get_help_sections(cmd[:commands].first)
|
55
|
+
|
56
|
+
option_arr = []
|
57
|
+
|
58
|
+
if data[:command_options]
|
59
|
+
Completion.parse_options(data[:command_options]).each do |option|
|
60
|
+
next if option.nil?
|
61
|
+
|
62
|
+
arg = ''
|
63
|
+
|
64
|
+
if option[:arg]
|
65
|
+
arg =<<~EOARG
|
66
|
+
args: {
|
67
|
+
#{indent} name: "#{option[:arg]}",
|
68
|
+
#{indent} description: "#{option[:arg]}",
|
69
|
+
#{indent} },
|
70
|
+
EOARG
|
71
|
+
end
|
72
|
+
|
73
|
+
if option[:short]
|
74
|
+
opt_data =<<~EOOPT
|
75
|
+
{
|
76
|
+
#{indent} name: ["-#{option[:short]}", "--#{option[:long]}"],
|
77
|
+
#{indent} description: "#{option[:description].sanitize}",
|
78
|
+
#{indent} #{arg}
|
79
|
+
#{indent}},
|
80
|
+
EOOPT
|
81
|
+
else
|
82
|
+
opt_data = <<~EOOPT
|
83
|
+
{
|
84
|
+
#{indent} name: ["--#{option[:long]}"],
|
85
|
+
#{indent} description: "#{option[:description].sanitize}",
|
86
|
+
#{indent} #{arg}
|
87
|
+
#{indent}},
|
88
|
+
EOOPT
|
89
|
+
end
|
90
|
+
|
91
|
+
option_arr << opt_data
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
cmd_opts = <<~EOCMD
|
96
|
+
options: [
|
97
|
+
#{indent}#{option_arr.join("\n#{indent}")}
|
98
|
+
],
|
99
|
+
EOCMD
|
100
|
+
out << cmd_opts
|
101
|
+
end
|
102
|
+
|
103
|
+
out.join("\n")
|
104
|
+
end
|
105
|
+
|
106
|
+
def initialize
|
107
|
+
data = Completion.get_help_sections
|
108
|
+
@global_options = Completion.parse_options(data[:global_options])
|
109
|
+
@commands = Completion.parse_commands(data[:commands])
|
110
|
+
@bar = TTY::ProgressBar.new(" \033[0;0;33mGenerating Fig completions: \033[0;35;40m[:bar] :status\033[0m", total: @commands.count + 1, bar_format: :square, hide_cursor: true, status: 'processing subcommands')
|
111
|
+
width = TTY::Screen.columns - 45
|
112
|
+
@bar.resize(width)
|
113
|
+
end
|
114
|
+
|
115
|
+
def generate_completions
|
116
|
+
@bar.start
|
117
|
+
generate_helpers
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
data/lib/doing/completion.rb
CHANGED
@@ -6,6 +6,7 @@ require_relative 'completion/completion_string'
|
|
6
6
|
require_relative 'completion/fish_completion'
|
7
7
|
require_relative 'completion/zsh_completion'
|
8
8
|
require_relative 'completion/bash_completion'
|
9
|
+
require_relative 'completion/fig_completion'
|
9
10
|
|
10
11
|
module Doing
|
11
12
|
# Completion script generator
|
@@ -15,8 +16,8 @@ module Doing
|
|
15
16
|
COMMAND_RX = /^(?<cmd>[^, \t]+)(?<alias>(?:, [^, \t]+)*)?\s+- (?<desc>.*?)$/.freeze
|
16
17
|
|
17
18
|
class << self
|
18
|
-
def get_help_sections(command =
|
19
|
-
res = `doing help #{command}`.strip
|
19
|
+
def get_help_sections(command = "")
|
20
|
+
res = `doing help #{command}|command cat`.strip
|
20
21
|
scanned = res.scan(SECTIONS_RX)
|
21
22
|
sections = {}
|
22
23
|
scanned.each do |sect|
|
@@ -85,7 +86,7 @@ module Doing
|
|
85
86
|
type = normalize_type(type)
|
86
87
|
raise InvalidArgument, 'Unrecognized shell specified' if type == :invalid
|
87
88
|
|
88
|
-
return %i[zsh bash fish].each { |t| link_default(t) } if type == :all
|
89
|
+
return %i[zsh bash fish fig].each { |t| link_default(t) } if type == :all
|
89
90
|
|
90
91
|
install_builtin(type)
|
91
92
|
|
@@ -98,6 +99,7 @@ module Doing
|
|
98
99
|
|
99
100
|
if File.exist?(File.join(default_dir, default_filenames[type]))
|
100
101
|
return unless Doing::Prompt.yn("Update #{type} completion script", default_response: 'n')
|
102
|
+
|
101
103
|
end
|
102
104
|
|
103
105
|
FileUtils.cp(src, default_dir)
|
@@ -106,6 +108,8 @@ module Doing
|
|
106
108
|
|
107
109
|
def normalize_type(type)
|
108
110
|
case type.to_s
|
111
|
+
when /^fig/i
|
112
|
+
:fig
|
109
113
|
when /^f/i
|
110
114
|
:fish
|
111
115
|
when /^b/i
|
@@ -123,6 +127,8 @@ module Doing
|
|
123
127
|
|
124
128
|
def generate_type(type)
|
125
129
|
generator = case type.to_s
|
130
|
+
when /^fig/i
|
131
|
+
FigCompletions.new
|
126
132
|
when /^f/i
|
127
133
|
FishCompletions.new
|
128
134
|
when /^b/i
|
@@ -149,7 +155,7 @@ module Doing
|
|
149
155
|
end
|
150
156
|
|
151
157
|
def default_filenames
|
152
|
-
{ zsh: '_doing.zsh', bash: 'doing.bash', fish: 'doing.fish' }
|
158
|
+
{ zsh: '_doing.zsh', bash: 'doing.bash', fish: 'doing.fish', fig: 'doing.ts' }
|
153
159
|
end
|
154
160
|
|
155
161
|
def default_file(type)
|
@@ -188,6 +194,8 @@ module Doing
|
|
188
194
|
Doing.logger.warn('File written:', 'zsh completions written to lib/completion/_doing.zsh')
|
189
195
|
generate_completion(type: 'bash', file: 'lib/completion/doing.bash', link: false)
|
190
196
|
Doing.logger.warn('File written:', 'bash completions written to lib/completion/doing.bash')
|
197
|
+
generate_completion(type: 'fig', file: 'lib/completion/doing.ts', link: false)
|
198
|
+
Doing.logger.warn('File written:', 'Fig completions written to lib/completion/doing.ts')
|
191
199
|
end
|
192
200
|
|
193
201
|
def link_completion_type(type, file)
|
@@ -197,6 +205,7 @@ module Doing
|
|
197
205
|
unless dir =~ %r{(\.bash_it/completion|bash_completion/completions)}
|
198
206
|
link_completion(file, ['~/.bash_it/completion/enabled', '/usr/share/bash_completion/completions'], 'doing.bash')
|
199
207
|
end
|
208
|
+
when /^fig/i
|
200
209
|
when /^f/i
|
201
210
|
link_completion(file, ['~/.config/fish/completions'], 'doing.fish') unless dir =~ %r{.config/fish/completions}
|
202
211
|
when /^z/i
|
@@ -214,6 +223,7 @@ module Doing
|
|
214
223
|
|
215
224
|
targets.each do |target|
|
216
225
|
next unless File.directory?(File.expand_path(target))
|
226
|
+
|
217
227
|
found = true
|
218
228
|
|
219
229
|
target_file = File.join(File.expand_path(target), filename)
|
data/lib/doing/version.rb
CHANGED
@@ -355,7 +355,8 @@ module Doing
|
|
355
355
|
def verify_duration(date, finish_date, title: nil)
|
356
356
|
max_elapsed = Doing.setting('interaction.confirm_longer_than', 0)
|
357
357
|
max_elapsed = max_elapsed.chronify_qty if max_elapsed.is_a?(String)
|
358
|
-
date = date.chronify(guess: :end, context: :today) if
|
358
|
+
date = date.chronify(guess: :end, context: :today) if date.is_a?(String)
|
359
|
+
finish_date = finish_date.chronify(guess: :end, context: :today) if finish_date.is_a?(String)
|
359
360
|
|
360
361
|
elapsed = finish_date - date
|
361
362
|
|
data/lib/doing/wwid/modify.rb
CHANGED
@@ -39,7 +39,8 @@ module Doing
|
|
39
39
|
|
40
40
|
if opt[:done] && entry.should_finish?
|
41
41
|
if entry.should_time?
|
42
|
-
|
42
|
+
finish = opt[:done].is_a?(String) ? opt[:done].chronify(guess: :end, context: :today) : opt[:done]
|
43
|
+
entry.tag('done', value: finish)
|
43
44
|
else
|
44
45
|
entry.tag('done')
|
45
46
|
end
|
@@ -47,15 +48,11 @@ module Doing
|
|
47
48
|
|
48
49
|
entry.note = note
|
49
50
|
|
50
|
-
items = @content.clone
|
51
51
|
if opt[:timed]
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
finish_date = verify_duration(i.date, opt[:back], title: i.title)
|
57
|
-
items[x].tag('done', value: finish_date.strftime('%F %R'))
|
58
|
-
break
|
52
|
+
last_item = last_entry({ section: section })
|
53
|
+
if last_item.tags?(['done'], :not)
|
54
|
+
finish_date = verify_duration(last_item.date, opt[:back], title: last_item.title)
|
55
|
+
last_item.tag('done', value: finish_date.strftime('%F %R'))
|
59
56
|
end
|
60
57
|
end
|
61
58
|
|