doing 2.1.29 → 2.1.33
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/.irbrc +1 -0
- data/CHANGELOG.md +4962 -0
- data/Dockerfile-2.6 +3 -1
- data/Dockerfile-2.7 +4 -2
- data/Dockerfile-3.0 +3 -1
- data/Gemfile.lock +2 -67
- data/README.md +1 -1
- data/bash_profile +13 -0
- data/bin/commands/again.rb +1 -1
- data/bin/commands/archive.rb +3 -3
- data/bin/commands/cancel.rb +1 -1
- data/bin/commands/changes.rb +2 -2
- data/bin/commands/commands.rb +8 -8
- data/bin/commands/completion.rb +61 -19
- data/bin/commands/config.rb +20 -17
- data/bin/commands/done.rb +1 -1
- data/bin/commands/flag.rb +1 -1
- data/bin/commands/grep.rb +5 -5
- data/bin/commands/last.rb +1 -1
- data/bin/commands/meanwhile.rb +1 -1
- data/bin/commands/now.rb +1 -1
- data/bin/commands/on.rb +1 -1
- data/bin/commands/open.rb +4 -4
- data/bin/commands/recent.rb +4 -4
- data/bin/commands/show.rb +8 -8
- data/bin/commands/since.rb +1 -1
- data/bin/commands/tag_dir.rb +27 -3
- data/bin/commands/today.rb +1 -1
- data/bin/commands/view.rb +3 -3
- data/bin/commands/yesterday.rb +2 -2
- data/bin/doing +26 -135
- 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/Color.html +1 -1
- data/docs/doc/Doing/Completion.html +324 -4
- data/docs/doc/Doing/Configuration.html +3 -3
- 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/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/Hooks.html +1 -1
- data/docs/doc/Doing/Item.html +125 -1
- data/docs/doc/Doing/Items.html +1 -1
- data/docs/doc/Doing/LogAdapter.html +1 -1
- data/docs/doc/Doing/Note.html +109 -3
- 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/Section.html +1 -1
- data/docs/doc/Doing/TemplateString.html +1 -1
- data/docs/doc/Doing/Types.html +2 -2
- data/docs/doc/Doing/Util/Backup.html +1 -1
- data/docs/doc/Doing/Util.html +1 -1
- data/docs/doc/Doing/WWID.html +6 -6
- 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/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 +3 -1
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/method_list.html +337 -241
- data/docs/doc/top-level-namespace.html +105 -1
- data/docs/index.md +1 -1
- data/doing.gemspec +24 -23
- data/doing.rdoc +34 -13
- data/example_plugin.rb +7 -5
- data/inputrc +57 -0
- data/lib/completion/_doing.zsh +46 -46
- data/lib/completion/doing.bash +2 -2
- data/lib/completion/doing.fish +4 -4
- data/lib/doing/add_options.rb +117 -0
- data/lib/doing/array/array.rb +16 -0
- data/lib/doing/changelog/changes.rb +8 -6
- data/lib/doing/changelog/version.rb +11 -3
- data/lib/doing/completion/bash_completion.rb +12 -51
- data/lib/doing/completion/fish_completion.rb +17 -53
- data/lib/doing/completion/zsh_completion.rb +21 -54
- data/lib/doing/completion.rb +203 -17
- data/lib/doing/configuration.rb +12 -6
- data/lib/doing/item.rb +21 -3
- data/lib/doing/items.rb +5 -5
- data/lib/doing/note.rb +24 -8
- data/lib/doing/plugins/export/dayone_export.rb +8 -6
- data/lib/doing/plugins/export/html_export.rb +4 -4
- data/lib/doing/plugins/export/json_export.rb +19 -20
- data/lib/doing/plugins/export/markdown_export.rb +2 -2
- data/lib/doing/plugins/export/template_export.rb +4 -4
- data/lib/doing/plugins/import/calendar_import.rb +1 -1
- data/lib/doing/plugins/import/doing_import.rb +1 -1
- data/lib/doing/plugins/import/timing_import.rb +1 -1
- data/lib/doing/section.rb +1 -1
- data/lib/doing/string/highlight.rb +3 -4
- data/lib/doing/string/string.rb +8 -0
- data/lib/doing/types.rb +1 -1
- data/lib/doing/util.rb +1 -1
- data/lib/doing/util_backup.rb +12 -12
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +75 -76
- data/lib/doing.rb +58 -0
- data/lib/examples/commands/wiki.rb +27 -19
- data/lib/helpers/threaded_tests.rb +2 -0
- data/scripts/setting_replace.rb +11 -0
- metadata +107 -102
- data/.yardoc/checksums +0 -29
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
data/lib/completion/_doing.zsh
CHANGED
|
@@ -18,7 +18,7 @@ function _doing() {
|
|
|
18
18
|
'changelog:List recent changes in Doing'
|
|
19
19
|
'colors:List available color variables for configuration templates and views'
|
|
20
20
|
'commands:Enable and disable Doing commands'
|
|
21
|
-
'completion:Generate shell completion scripts'
|
|
21
|
+
'completion:Generate shell completion scripts for doing'
|
|
22
22
|
'config:Edit the configuration file or output a value from it'
|
|
23
23
|
'done:Add a completed item with @done(date)'
|
|
24
24
|
'did:Add a completed item with @done(date)'
|
|
@@ -70,28 +70,28 @@ function _doing() {
|
|
|
70
70
|
args=( )
|
|
71
71
|
;;
|
|
72
72
|
again)
|
|
73
|
-
args=( {-X
|
|
73
|
+
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 *dont* match search/tag filterst* 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]" )
|
|
74
74
|
;;
|
|
75
75
|
resume)
|
|
76
|
-
args=( {-X
|
|
76
|
+
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 *dont* match search/tag filterst* 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]" )
|
|
77
77
|
;;
|
|
78
78
|
archive)
|
|
79
|
-
args=( "
|
|
79
|
+
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 *dont* match search/tag filterst* 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]" )
|
|
80
80
|
;;
|
|
81
81
|
move)
|
|
82
|
-
args=( "
|
|
82
|
+
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 *dont* match search/tag filterst* 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]" )
|
|
83
83
|
;;
|
|
84
84
|
autotag)
|
|
85
|
-
args=( "
|
|
85
|
+
args=( "--bool[Boolean]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to autotag]:COUNT:" "--force[Dont ask permission to autotag all entries when count is 0t 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]" )
|
|
86
86
|
;;
|
|
87
87
|
cancel)
|
|
88
|
-
args=( {-a
|
|
88
|
+
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 *dont* match search/tag filterst* 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]" )
|
|
89
89
|
;;
|
|
90
90
|
changes)
|
|
91
|
-
args=( {-C
|
|
91
|
+
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]" "--render[Force rendered output]" {'(--search)-s','(-s)--search'}"[Show changelogs matching search terms]:arg:" "--sort[Sort order]:ORDER:" )
|
|
92
92
|
;;
|
|
93
93
|
changelog)
|
|
94
|
-
args=( {-C
|
|
94
|
+
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]" "--render[Force rendered output]" {'(--search)-s','(-s)--search'}"[Show changelogs matching search terms]:arg:" "--sort[Sort order]:ORDER:" )
|
|
95
95
|
;;
|
|
96
96
|
colors)
|
|
97
97
|
args=( )
|
|
@@ -100,121 +100,121 @@ function _doing() {
|
|
|
100
100
|
args=( )
|
|
101
101
|
;;
|
|
102
102
|
completion)
|
|
103
|
-
args=( {-
|
|
103
|
+
args=( {'(--type)-t','(-t)--type'}"[Deprecated]:arg:" )
|
|
104
104
|
;;
|
|
105
105
|
config)
|
|
106
|
-
args=( {-d
|
|
106
|
+
args=( {'(--dump)-d','(-d)--dump'}"[DEPRECATED]" {'(--update)-u','(-u)--update'}"[DEPRECATED]" )
|
|
107
107
|
;;
|
|
108
108
|
done)
|
|
109
|
-
args=( {-X
|
|
109
|
+
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]" )
|
|
110
110
|
;;
|
|
111
111
|
did)
|
|
112
|
-
args=( {-X
|
|
112
|
+
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]" )
|
|
113
113
|
;;
|
|
114
114
|
finish)
|
|
115
|
-
args=( {-a
|
|
115
|
+
args=( {'(--archive)-a','(-a)--archive'}"[Archive entries]" "--finished[Set finish date to specific date/time]:DATE_STRING:" "--auto[Auto-generate finish dates from next entrys start times 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]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to finish from a menu of matching entries]" "--not[Finish items that *dont* match search/tag filterst* 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 the completed date to the start date plus XX(hmd)]: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]" )
|
|
116
116
|
;;
|
|
117
117
|
grep)
|
|
118
|
-
args=( "
|
|
118
|
+
args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--bool[Combine multiple tags or value queries using AND]: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[Show items that *dont* match search stringt* match search string]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--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 string matching]" )
|
|
119
119
|
;;
|
|
120
120
|
search)
|
|
121
|
-
args=( "
|
|
121
|
+
args=( "--after[Search entries newer than date]:DATE_STRING:" "--before[Search entries older than date]:DATE_STRING:" "--bool[Combine multiple tags or value queries using AND]: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[Show items that *dont* match search stringt* match search string]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" "--only_timed[Only show items with recorded time intervals]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--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 string matching]" )
|
|
122
122
|
;;
|
|
123
123
|
help)
|
|
124
124
|
args=( )
|
|
125
125
|
;;
|
|
126
126
|
import)
|
|
127
|
-
args=( "
|
|
127
|
+
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 *dont* match search/tag/date filterst* 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]" )
|
|
128
128
|
;;
|
|
129
129
|
last)
|
|
130
|
-
args=( "
|
|
130
|
+
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 *dont* match search/tag filterst* match search/tag filters]" {'(--section)-s','(-s)--section'}"[Specify a section]: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:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
|
131
131
|
;;
|
|
132
132
|
mark)
|
|
133
|
-
args=( "
|
|
133
|
+
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[Dont ask permission to flag all entries when count is 0t 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 *dont* match search/tag filterst* 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]" )
|
|
134
134
|
;;
|
|
135
135
|
flag)
|
|
136
|
-
args=( "
|
|
136
|
+
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[Dont ask permission to flag all entries when count is 0t 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 *dont* match search/tag filterst* 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]" )
|
|
137
137
|
;;
|
|
138
138
|
meanwhile)
|
|
139
|
-
args=( {-X
|
|
139
|
+
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:" )
|
|
140
140
|
;;
|
|
141
141
|
note)
|
|
142
|
-
args=( "
|
|
142
|
+
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 *dont* match search/tag filterst* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Replace/Remove last entrys notes 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]" )
|
|
143
143
|
;;
|
|
144
144
|
now)
|
|
145
|
-
args=( {-X
|
|
145
|
+
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:" )
|
|
146
146
|
;;
|
|
147
147
|
next)
|
|
148
|
-
args=( {-X
|
|
148
|
+
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:" )
|
|
149
149
|
;;
|
|
150
150
|
on)
|
|
151
|
-
args=( "
|
|
151
|
+
args=( "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--totals[Show time totals at the end of output]" )
|
|
152
152
|
;;
|
|
153
153
|
open)
|
|
154
|
-
args=( {-a
|
|
154
|
+
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:" )
|
|
155
155
|
;;
|
|
156
156
|
plugins)
|
|
157
|
-
args=( {-c
|
|
157
|
+
args=( {'(--column)-c','(-c)--column'}"[List in single column for completion]" {'(--type)-t','(-t)--type'}"[List plugins of type]:TYPE:" )
|
|
158
158
|
;;
|
|
159
159
|
recent)
|
|
160
|
-
args=( "
|
|
160
|
+
args=( "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries to perform additional operations]" {'(--section)-s','(-s)--section'}"[Section]:NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--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]" )
|
|
161
161
|
;;
|
|
162
162
|
redo)
|
|
163
|
-
args=( {-f
|
|
163
|
+
args=( {'(--file)-f','(-f)--file'}"[Specify alternate doing file]:PATH:" {'(--interactive)-i','(-i)--interactive'}"[Select from an interactive menu]" )
|
|
164
164
|
;;
|
|
165
165
|
reset)
|
|
166
|
-
args=( "
|
|
166
|
+
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries]" "--not[Reset items that *dont* match search/tag filterst* 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:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
|
167
167
|
;;
|
|
168
168
|
begin)
|
|
169
|
-
args=( "
|
|
169
|
+
args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching ((c)ase-sensitive]:TYPE:" {'(--interactive)-i','(-i)--interactive'}"[Select from a menu of matching entries]" "--not[Reset items that *dont* match search/tag filterst* 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:" "--tag[Filter entries by tag]:TAG:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
|
|
170
170
|
;;
|
|
171
171
|
rotate)
|
|
172
|
-
args=( "
|
|
172
|
+
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 *dont* match search/tag filterst* 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]" )
|
|
173
173
|
;;
|
|
174
174
|
sections)
|
|
175
|
-
args=( {-c
|
|
175
|
+
args=( {'(--column)-c','(-c)--column'}"[List in single column]" )
|
|
176
176
|
;;
|
|
177
177
|
select)
|
|
178
|
-
args=( {-a
|
|
178
|
+
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 *dont* match search/tag filterst* 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]" )
|
|
179
179
|
;;
|
|
180
180
|
show)
|
|
181
|
-
args=( {-a
|
|
181
|
+
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]" "--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 *dont* match search/tag filterst* 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:" "--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]" )
|
|
182
182
|
;;
|
|
183
183
|
since)
|
|
184
|
-
args=( "
|
|
184
|
+
args=( "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" "--duration[Show elapsed time on entries without @done tag]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" {'(--section)-s','(-s)--section'}"[Section]:NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--totals[Show time totals at the end of output]" )
|
|
185
185
|
;;
|
|
186
186
|
tag)
|
|
187
|
-
args=( {-a
|
|
187
|
+
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[Dont ask permission to tag all entries when count is 0t 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 *dont* match search/tag filterst* 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]" )
|
|
188
188
|
;;
|
|
189
189
|
tag_dir)
|
|
190
|
-
args=( {-r
|
|
190
|
+
args=( {'(--remove)-r','(-r)--remove'}"[Remove all default_tags from the local]" )
|
|
191
191
|
;;
|
|
192
192
|
tags)
|
|
193
|
-
args=( "
|
|
193
|
+
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 *dont* match search/tag filterst* 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]" )
|
|
194
194
|
;;
|
|
195
195
|
template)
|
|
196
|
-
args=( {-c
|
|
196
|
+
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]" )
|
|
197
197
|
;;
|
|
198
198
|
test)
|
|
199
199
|
args=( )
|
|
200
200
|
;;
|
|
201
201
|
today)
|
|
202
|
-
args=( "
|
|
202
|
+
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:" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" {'(--times)-t','(-t)--times'}"[Show time intervals on @done tasks]" "--tag_sort[Sort tags by]:KEY:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--totals[Show time totals at the end of output]" )
|
|
203
203
|
;;
|
|
204
204
|
undo)
|
|
205
|
-
args=( {-f
|
|
205
|
+
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]" )
|
|
206
206
|
;;
|
|
207
207
|
view)
|
|
208
|
-
args=( "
|
|
208
|
+
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]" "--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 *dont* match search/tag filterst* 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:" "--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]" )
|
|
209
209
|
;;
|
|
210
210
|
views)
|
|
211
|
-
args=( {-c
|
|
211
|
+
args=( {'(--column)-c','(-c)--column'}"[List in single column]" )
|
|
212
212
|
;;
|
|
213
213
|
wiki)
|
|
214
|
-
args=( "
|
|
214
|
+
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:" )
|
|
215
215
|
;;
|
|
216
216
|
yesterday)
|
|
217
|
-
args=( "
|
|
217
|
+
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]:TIME_RANGE:" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" {'(--section)-s','(-s)--section'}"[Specify a section]: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:" "--totals[Show time totals at the end of output]" )
|
|
218
218
|
;;
|
|
219
219
|
esac
|
|
220
220
|
|
data/lib/completion/doing.bash
CHANGED
|
@@ -71,9 +71,9 @@ _doing_changes() {
|
|
|
71
71
|
_doing_completion() {
|
|
72
72
|
|
|
73
73
|
if [[ "$token" == --* ]]; then
|
|
74
|
-
COMPREPLY=( $( compgen -W '--
|
|
74
|
+
COMPREPLY=( $( compgen -W '--type' -- $token ) )
|
|
75
75
|
elif [[ "$token" == -* ]]; then
|
|
76
|
-
COMPREPLY=( $( compgen -W '-
|
|
76
|
+
COMPREPLY=( $( compgen -W '-t --type' -- $token ) )
|
|
77
77
|
|
|
78
78
|
fi
|
|
79
79
|
}
|
data/lib/completion/doing.fish
CHANGED
|
@@ -143,7 +143,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'cancel' -d End\ last\ X\
|
|
|
143
143
|
complete -xc doing -n '__fish_doing_needs_command' -a 'changes changelog' -d List\ recent\ changes\ in\ Doing
|
|
144
144
|
complete -xc doing -n '__fish_doing_needs_command' -a 'colors' -d List\ available\ color\ variables\ for\ configuration\ templates\ and\ views
|
|
145
145
|
complete -xc doing -n '__fish_doing_needs_command' -a 'commands' -d Enable\ and\ disable\ Doing\ commands
|
|
146
|
-
complete -xc doing -n '__fish_doing_needs_command' -a 'completion' -d Generate\ shell\ completion\ scripts
|
|
146
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'completion' -d Generate\ shell\ completion\ scripts\ for\ doing
|
|
147
147
|
complete -xc doing -n '__fish_doing_needs_command' -a 'config' -d Edit\ the\ configuration\ file\ or\ output\ a\ value\ from\ it
|
|
148
148
|
complete -xc doing -n '__fish_doing_needs_command' -a 'done did' -d Add\ a\ completed\ item\ with\ @done\(date\)
|
|
149
149
|
complete -xc doing -n '__fish_doing_needs_command' -a 'finish' -d Mark\ last\ X\ entries\ as\ @done
|
|
@@ -232,8 +232,7 @@ complete -c doing -l markdown -f -n '__fish_doing_using_command changes change
|
|
|
232
232
|
complete -c doing -l render -f -n '__fish_doing_using_command changes changelog' -d Force\ rendered\ output
|
|
233
233
|
complete -c doing -l search -s s -f -r -n '__fish_doing_using_command changes changelog' -d Show\ changelogs\ matching\ search\ terms
|
|
234
234
|
complete -c doing -l sort -f -r -n '__fish_doing_using_command changes changelog' -d Sort\ order
|
|
235
|
-
complete -c doing -l
|
|
236
|
-
complete -c doing -l type -s t -f -r -n '__fish_doing_using_command completion' -d Shell\ to\ generate\ for
|
|
235
|
+
complete -c doing -l type -s t -f -r -n '__fish_doing_using_command completion' -d Deprecated
|
|
237
236
|
complete -c doing -l dump -s d -f -n '__fish_doing_using_command config' -d DEPRECATED
|
|
238
237
|
complete -c doing -l update -s u -f -n '__fish_doing_using_command config' -d DEPRECATED
|
|
239
238
|
complete -c doing -l noauto -s X -f -n '__fish_doing_using_command done did' -d Exclude\ auto\ tags\ and\ default\ tags
|
|
@@ -556,7 +555,8 @@ complete -c doing -l template -f -r -n '__fish_doing_using_command yesterday' -
|
|
|
556
555
|
complete -c doing -l totals -f -n '__fish_doing_using_command yesterday' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
|
557
556
|
complete -f -c doing -s o -l output -x -n '__fish_doing_using_command grep search on select show since today view yesterday' -a '(__fish_doing_export_plugin)'
|
|
558
557
|
complete -f -c doing -s b -l bool -x -n '__fish_doing_using_command again resume archive move autotag cancel finish grep search last mark flag note reset begin rotate show tag tags view wiki' -a 'and or not pattern'
|
|
559
|
-
complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel
|
|
558
|
+
complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel finish grep search import last mark flag note reset begin rotate select show tag tags view' -a 'case-sensitive ignore smart'
|
|
559
|
+
complete -f -c doing -l sort -x -n '__fish_doing_using_command changes changelog show tags' -a 'asc desc'
|
|
560
560
|
complete -f -c doing -l tag_sort -x -n '__fish_doing_using_command grep search on recent show since today view yesterday' -a 'name time'
|
|
561
561
|
complete -f -c doing -l tag_order -x -n '__fish_doing_using_command show view yesterday' -a 'asc desc'
|
|
562
562
|
complete -f -c doing -s a -l age -x -n '__fish_doing_using_command show view' -a 'oldest newest'
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
##
|
|
4
|
+
## Add presets of flags and switches to a command.
|
|
5
|
+
##
|
|
6
|
+
## :add_entry => --noauto, --note, --ask, --editor, --back
|
|
7
|
+
##
|
|
8
|
+
## :search => --search, --case, --exact
|
|
9
|
+
##
|
|
10
|
+
## :tag_filter => --tag, --bool, --not, --val
|
|
11
|
+
##
|
|
12
|
+
## :date_filter => --before, --after, --from
|
|
13
|
+
##
|
|
14
|
+
## @param type [Symbol] The type
|
|
15
|
+
## @param cmd The GLI command to which the options will be added
|
|
16
|
+
##
|
|
17
|
+
def add_options(type, cmd)
|
|
18
|
+
cmd_name = cmd.name.to_s
|
|
19
|
+
action = case cmd_name
|
|
20
|
+
when /again/
|
|
21
|
+
'Repeat'
|
|
22
|
+
when /grep/
|
|
23
|
+
'Search'
|
|
24
|
+
when /mark/
|
|
25
|
+
'Flag'
|
|
26
|
+
when /(last|tags|view)/
|
|
27
|
+
'Show'
|
|
28
|
+
else
|
|
29
|
+
cmd_name.capitalize
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
case type
|
|
33
|
+
when :add_entry
|
|
34
|
+
cmd.desc 'Exclude auto tags and default tags'
|
|
35
|
+
cmd.switch %i[X noauto], default_value: false, negatable: false
|
|
36
|
+
|
|
37
|
+
cmd.desc 'Include a note'
|
|
38
|
+
cmd.arg_name 'TEXT'
|
|
39
|
+
cmd.flag %i[n note]
|
|
40
|
+
|
|
41
|
+
cmd.desc 'Prompt for note via multi-line input'
|
|
42
|
+
cmd.switch %i[ask], negatable: false, default_value: false
|
|
43
|
+
|
|
44
|
+
cmd.desc "Edit entry with #{Doing::Util.default_editor}"
|
|
45
|
+
cmd.switch %i[e editor], negatable: false, default_value: false
|
|
46
|
+
|
|
47
|
+
cmd.desc 'Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]'
|
|
48
|
+
cmd.arg_name 'DATE_STRING'
|
|
49
|
+
cmd.flag %i[b back started], type: DateBeginString
|
|
50
|
+
when :search
|
|
51
|
+
cmd.desc 'Filter entries using a search query, surround with slashes for regex (e.g. "/query.*/"),
|
|
52
|
+
start with single quote for exact match ("\'query")'
|
|
53
|
+
cmd.arg_name 'QUERY'
|
|
54
|
+
cmd.flag [:search]
|
|
55
|
+
|
|
56
|
+
cmd.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
57
|
+
cmd.arg_name 'TYPE'
|
|
58
|
+
cmd.flag [:case], must_match: REGEX_CASE,
|
|
59
|
+
default_value: Doing.settings.dig('search', 'case').normalize_case,
|
|
60
|
+
type: CaseSymbol
|
|
61
|
+
|
|
62
|
+
cmd.desc 'Force exact search string matching (case sensitive)'
|
|
63
|
+
cmd.switch %i[x exact], default_value: Doing.config.exact_match?, negatable: Doing.config.exact_match?
|
|
64
|
+
when :tag_filter
|
|
65
|
+
cmd.desc 'Filter entries by tag. Combine multiple tags with a comma. Wildcards allowed (*, ?)'
|
|
66
|
+
cmd.arg_name 'TAG'
|
|
67
|
+
cmd.flag [:tag], type: TagArray
|
|
68
|
+
|
|
69
|
+
cmd.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50").
|
|
70
|
+
May be used multiple times, combined with --bool'
|
|
71
|
+
cmd.arg_name 'QUERY'
|
|
72
|
+
cmd.flag [:val], multiple: true, must_match: REGEX_VALUE_QUERY
|
|
73
|
+
|
|
74
|
+
cmd.desc "#{action} items that *don't* match search/tag filters"
|
|
75
|
+
cmd.switch [:not], default_value: false, negatable: false
|
|
76
|
+
|
|
77
|
+
cmd.desc 'Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans'
|
|
78
|
+
cmd.arg_name 'BOOLEAN'
|
|
79
|
+
cmd.flag [:bool], must_match: REGEX_BOOL,
|
|
80
|
+
default_value: :pattern,
|
|
81
|
+
type: BooleanSymbol
|
|
82
|
+
when :date_filter
|
|
83
|
+
if action =~ /Archive/
|
|
84
|
+
cmd.desc 'Archive entries older than date (natural language).'
|
|
85
|
+
else
|
|
86
|
+
cmd.desc "#{action} entries older than date (natural language). If this is only a time (8am, 1:30pm, 15:00), all
|
|
87
|
+
dates will be included, but entries will be filtered by time of day"
|
|
88
|
+
end
|
|
89
|
+
cmd.arg_name 'DATE_STRING'
|
|
90
|
+
cmd.flag [:before], type: DateBeginString
|
|
91
|
+
|
|
92
|
+
if action =~ /Archive/
|
|
93
|
+
cmd.desc 'Archive entries newer than date (natural language).'
|
|
94
|
+
else
|
|
95
|
+
cmd.desc "#{action} entries newer than date (natural language). If this is only a time (8am, 1:30pm, 15:00), all
|
|
96
|
+
dates will be included, but entries will be filtered by time of day"
|
|
97
|
+
end
|
|
98
|
+
cmd.arg_name 'DATE_STRING'
|
|
99
|
+
cmd.flag [:after], type: DateEndString
|
|
100
|
+
|
|
101
|
+
if action =~ /Archive/
|
|
102
|
+
cmd.desc %(
|
|
103
|
+
Date range (natural language) to archive: `doing archive --from "1/1/21 to 12/31/21"`.
|
|
104
|
+
)
|
|
105
|
+
else
|
|
106
|
+
cmd.desc %(
|
|
107
|
+
Date range (natural language) to #{action.downcase}, or a single day to filter on.
|
|
108
|
+
To specify a range, use "to": `doing #{cmd_name} --from "monday 8am to friday 5pm"`.
|
|
109
|
+
|
|
110
|
+
If values are only time(s) (6am to noon) all dates will be included, but entries will be filtered
|
|
111
|
+
by time of day.
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
cmd.arg_name 'DATE_OR_RANGE'
|
|
115
|
+
cmd.flag [:from], type: DateRangeString
|
|
116
|
+
end
|
|
117
|
+
end
|
data/lib/doing/array/array.rb
CHANGED
|
@@ -2,3 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative 'tags'
|
|
4
4
|
require_relative 'nested_hash'
|
|
5
|
+
|
|
6
|
+
class ::Array
|
|
7
|
+
##
|
|
8
|
+
## Force UTF-8 encoding of strings in array
|
|
9
|
+
##
|
|
10
|
+
## @return [Array] Encoded lines
|
|
11
|
+
##
|
|
12
|
+
def utf8
|
|
13
|
+
c = self.class
|
|
14
|
+
if String.method_defined? :force_encoding
|
|
15
|
+
replace c.new(map(&:utf8))
|
|
16
|
+
else
|
|
17
|
+
self
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -36,13 +36,14 @@ module Doing
|
|
|
36
36
|
fzf_args: [
|
|
37
37
|
%(--preview='doing changes --render -l {1}'),
|
|
38
38
|
'--disabled',
|
|
39
|
+
'--height=50',
|
|
39
40
|
'--preview-window="right,70%"'
|
|
40
41
|
])
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
def to_s
|
|
44
45
|
if @changes_only
|
|
45
|
-
@changes.map(&:changes_only).join().force_encoding('utf-8')
|
|
46
|
+
@changes.map(&:changes_only).delete_if(&:empty?).join().gsub(/\n+/, "\n").force_encoding('utf-8')
|
|
46
47
|
else
|
|
47
48
|
@changes.map(&:to_s).join("\n\n").force_encoding('utf-8')
|
|
48
49
|
end
|
|
@@ -65,18 +66,19 @@ module Doing
|
|
|
65
66
|
def lookup(lookup_version)
|
|
66
67
|
range = []
|
|
67
68
|
|
|
68
|
-
if lookup_version =~ /([\d.]+)
|
|
69
|
+
if lookup_version =~ /([\d.]+) *(?:-|to)+ *([\d.]+)/
|
|
69
70
|
m = Regexp.last_match
|
|
70
71
|
lookup("> #{m[1]}")
|
|
71
72
|
lookup("< #{m[2]}")
|
|
72
|
-
elsif lookup_version.scan(/[
|
|
73
|
-
params = lookup_version.scan(/
|
|
73
|
+
elsif lookup_version.scan(/(?:<=?|prior|before|older|>=?|since|after|newer) *[0-9*?.]+/).count > 1
|
|
74
|
+
params = lookup_version.scan(/(?:<=?|prior|before|older|>=?|since|after|newer) *[0-9*?.]+/)
|
|
74
75
|
params.each { |query| lookup(query) }
|
|
75
76
|
else
|
|
77
|
+
inclusive = lookup_version =~ /=/ ? true : false
|
|
76
78
|
comp = case lookup_version
|
|
77
79
|
when /(<|prior|before|older)/
|
|
78
80
|
:older
|
|
79
|
-
when
|
|
81
|
+
when /(>|since|after|newer)/
|
|
80
82
|
:newer
|
|
81
83
|
else
|
|
82
84
|
:equal
|
|
@@ -84,7 +86,7 @@ module Doing
|
|
|
84
86
|
version = Version.new(lookup_version)
|
|
85
87
|
|
|
86
88
|
@changes.select! do |change|
|
|
87
|
-
change.version.compare(version, comp)
|
|
89
|
+
change.version.compare(version, comp, inclusive: inclusive)
|
|
88
90
|
end
|
|
89
91
|
end
|
|
90
92
|
end
|