doing 2.1.13 → 2.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardoc/checksums +5 -5
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +7 -1
- data/README.md +1 -1
- data/bin/doing +91 -28
- 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 +1 -1
- data/docs/doc/Doing/Configuration.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/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 +117 -13
- data/docs/doc/Doing/Items.html +1 -1
- data/docs/doc/Doing/LogAdapter.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 +35 -1
- data/docs/doc/Doing/Section.html +1 -1
- data/docs/doc/Doing/TemplateString.html +1 -1
- data/docs/doc/Doing/Util/Backup.html +1 -1
- data/docs/doc/Doing/Util.html +1 -1
- data/docs/doc/Doing/WWID.html +7 -5
- data/docs/doc/Doing.html +2 -2
- 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/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/_index.html +1 -1
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/method_list.html +206 -198
- data/docs/doc/top-level-namespace.html +1 -1
- data/docs/index.md +1 -1
- data/doing.gemspec +1 -0
- data/doing.rdoc +41 -4
- data/lib/completion/_doing.zsh +11 -11
- data/lib/completion/doing.bash +15 -15
- data/lib/completion/doing.fish +10 -3
- data/lib/doing/item.rb +25 -0
- data/lib/doing/plugins/import/calendar_import.rb +13 -1
- data/lib/doing/plugins/import/doing_import.rb +12 -1
- data/lib/doing/plugins/import/timing_import.rb +13 -1
- data/lib/doing/prompt.rb +13 -1
- data/lib/doing/time.rb +2 -2
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +10 -5
- data/lib/doing.rb +1 -0
- metadata +21 -1
@@ -102,7 +102,7 @@
|
|
102
102
|
</div>
|
103
103
|
|
104
104
|
<div id="footer">
|
105
|
-
Generated on
|
105
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
106
106
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
107
107
|
0.9.26 (ruby-3.0.1).
|
108
108
|
</div>
|
data/docs/index.md
CHANGED
@@ -6,7 +6,7 @@ _If you're one of the rare people like me who find this useful, feel free to [bu
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
The current version of `doing` is 2.1.
|
9
|
+
The current version of `doing` is 2.1.12.
|
10
10
|
|
11
11
|
Find all of the documentation in the [doing wiki](https://github.com/ttscoff/doing/wiki).
|
12
12
|
|
data/doing.gemspec
CHANGED
@@ -40,6 +40,7 @@ spec = Gem::Specification.new do |s|
|
|
40
40
|
s.add_runtime_dependency('tty-link', '~> 0.1', '>= 0.1.1')
|
41
41
|
s.add_runtime_dependency('tty-which', '~> 0.5', '>= 0.5.0')
|
42
42
|
s.add_runtime_dependency('tty-markdown', '~> 0.7', '>= 0.7.0')
|
43
|
+
s.add_runtime_dependency('tty-reader', '~> 0.9', '>= 0.9.0')
|
43
44
|
s.add_runtime_dependency('parslet', '~> 2.0', '>= 2.0.0')
|
44
45
|
s.add_runtime_dependency('plist', '~> 3.6', '>= 3.6.0')
|
45
46
|
# s.add_runtime_dependency('amatch', '~> 0.4', '>= 0.4.0')
|
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.14
|
9
9
|
|
10
10
|
=== Global Options
|
11
11
|
=== --config_file arg
|
@@ -117,7 +117,7 @@ Add new entry to section (default: same section as repeated entry)
|
|
117
117
|
|
118
118
|
===== -n|--note TEXT
|
119
119
|
|
120
|
-
|
120
|
+
Add a note
|
121
121
|
|
122
122
|
[Default Value] None
|
123
123
|
|
@@ -152,6 +152,11 @@ Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be
|
|
152
152
|
[Must Match] (?-mix:^(?:!)?@?(?:\S+) +(?:!?[<>=][=*]?|[$*^]=) +(?:.*?)$)
|
153
153
|
|
154
154
|
|
155
|
+
===== --ask
|
156
|
+
Prompt for note via multi-line input
|
157
|
+
|
158
|
+
|
159
|
+
|
155
160
|
===== -e|--editor
|
156
161
|
Edit duplicated entry with vim before adding
|
157
162
|
|
@@ -566,6 +571,11 @@ Immediately archive the entry
|
|
566
571
|
|
567
572
|
|
568
573
|
|
574
|
+
===== --ask
|
575
|
+
Prompt for note via multi-line input
|
576
|
+
|
577
|
+
|
578
|
+
|
569
579
|
===== --[no-]date
|
570
580
|
Include date
|
571
581
|
|
@@ -891,7 +901,7 @@ Only import items matching search. Surround with slashes for regex (/query/), st
|
|
891
901
|
[Default Value] None
|
892
902
|
|
893
903
|
|
894
|
-
=====
|
904
|
+
===== -t|--tag TAGS
|
895
905
|
|
896
906
|
Tag all imported entries
|
897
907
|
|
@@ -1025,6 +1035,11 @@ Note
|
|
1025
1035
|
[Default Value] None
|
1026
1036
|
|
1027
1037
|
|
1038
|
+
===== --ask
|
1039
|
+
Prompt for note via multi-line input
|
1040
|
+
|
1041
|
+
|
1042
|
+
|
1028
1043
|
===== -e|--editor
|
1029
1044
|
Edit entry with vim
|
1030
1045
|
|
@@ -1158,6 +1173,11 @@ Archive previous @meanwhile entry
|
|
1158
1173
|
|
1159
1174
|
|
1160
1175
|
|
1176
|
+
===== --ask
|
1177
|
+
Prompt for note via multi-line input
|
1178
|
+
|
1179
|
+
|
1180
|
+
|
1161
1181
|
===== -e|--editor
|
1162
1182
|
Edit entry with vim
|
1163
1183
|
|
@@ -1217,6 +1237,11 @@ Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be
|
|
1217
1237
|
[Must Match] (?-mix:^(?:!)?@?(?:\S+) +(?:!?[<>=][=*]?|[$*^]=) +(?:.*?)$)
|
1218
1238
|
|
1219
1239
|
|
1240
|
+
===== --ask
|
1241
|
+
Prompt for note via multi-line input
|
1242
|
+
|
1243
|
+
|
1244
|
+
|
1220
1245
|
===== -e|--editor
|
1221
1246
|
Edit entry with vim
|
1222
1247
|
|
@@ -1272,6 +1297,11 @@ Section
|
|
1272
1297
|
[Default Value] None
|
1273
1298
|
|
1274
1299
|
|
1300
|
+
===== --ask
|
1301
|
+
Prompt for note via multi-line input
|
1302
|
+
|
1303
|
+
|
1304
|
+
|
1275
1305
|
===== -e|--editor
|
1276
1306
|
Edit entry with vim
|
1277
1307
|
|
@@ -1640,7 +1670,7 @@ Output entries to format (csv|dayone|dayone-days|dayone-entries|doing|html|json|
|
|
1640
1670
|
[Default Value] None
|
1641
1671
|
|
1642
1672
|
|
1643
|
-
===== -q|--query
|
1673
|
+
===== -q|--query QUERY
|
1644
1674
|
|
1645
1675
|
Initial search query for filtering. Matching is fuzzy. For exact matching, start query with a single quote, e.g. `--query "'search"
|
1646
1676
|
|
@@ -1661,6 +1691,13 @@ Save selected entries to file using --output format
|
|
1661
1691
|
[Default Value] None
|
1662
1692
|
|
1663
1693
|
|
1694
|
+
===== --search QUERY
|
1695
|
+
|
1696
|
+
Select from entries matching search filter, surround with slashes for regex (e.g. "/query.*/"), start with single quote for exact match ("'query")
|
1697
|
+
|
1698
|
+
[Default Value] None
|
1699
|
+
|
1700
|
+
|
1664
1701
|
===== -t|--tag TAG
|
1665
1702
|
|
1666
1703
|
Tag selected entries
|
data/lib/completion/_doing.zsh
CHANGED
@@ -70,10 +70,10 @@ function _doing() {
|
|
70
70
|
args=( )
|
71
71
|
;;
|
72
72
|
again)
|
73
|
-
args=( "(--bool=)--bool=}[Boolean used to combine multiple tags]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit duplicated entry with vim before adding]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[
|
73
|
+
args=( "(--ask)--ask}[Prompt for note via multi-line input]" "(--bool=)--bool=}[Boolean used to combine multiple tags]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit duplicated entry with vim before adding]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[Add a note]" "(--not)--not}[Resume items that *dont* match search/tag filterst* match search/tag filters]" {-s,--section=}"[Get last entry from a specific section]" "(--search=)--search=}[Repeat last entry matching search]" "(--tag=)--tag=}[Repeat last entry matching tags]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
74
74
|
;;
|
75
75
|
resume)
|
76
|
-
args=( "(--bool=)--bool=}[Boolean used to combine multiple tags]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit duplicated entry with vim before adding]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[
|
76
|
+
args=( "(--ask)--ask}[Prompt for note via multi-line input]" "(--bool=)--bool=}[Boolean used to combine multiple tags]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit duplicated entry with vim before adding]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[Add a note]" "(--not)--not}[Resume items that *dont* match search/tag filterst* match search/tag filters]" {-s,--section=}"[Get last entry from a specific section]" "(--search=)--search=}[Repeat last entry matching search]" "(--tag=)--tag=}[Repeat last entry matching tags]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
77
77
|
;;
|
78
78
|
archive)
|
79
79
|
args=( "(--before=)--before=}[Archive entries older than date]" "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-k,--keep=}"[How many items to keep]" "(--label)--label}[Label moved items with @from(SECTION_NAME)]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" "(--search=)--search=}[Search filter]" {-t,--to=}"[Move entries to]" "(--tag=)--tag=}[Tag filter]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
@@ -106,10 +106,10 @@ function _doing() {
|
|
106
106
|
args=( {-d,--dump}"[DEPRECATED]" {-u,--update}"[DEPRECATED]" )
|
107
107
|
;;
|
108
108
|
done)
|
109
|
-
args=( {-a,--archive}"[Immediately archive the entry]" "(--at=)--at=}[Set finish date to specific date/time]" "(--started=)--started=}[Backdate start date by interval or set to time [4pm|20m|2h|"yesterday noon"]]" "(--date)--date}[Include date]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Include a note]" {-r,--remove}"[Remove @done tag]" {-s,--section=}"[Section]" {-t,--took=}"[Set completion date to start date plus interval]" {-u,--unfinished}"[Finish last entry not already marked @done]" )
|
109
|
+
args=( {-a,--archive}"[Immediately archive the entry]" "(--ask)--ask}[Prompt for note via multi-line input]" "(--at=)--at=}[Set finish date to specific date/time]" "(--started=)--started=}[Backdate start date by interval or set to time [4pm|20m|2h|"yesterday noon"]]" "(--date)--date}[Include date]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Include a note]" {-r,--remove}"[Remove @done tag]" {-s,--section=}"[Section]" {-t,--took=}"[Set completion date to start date plus interval]" {-u,--unfinished}"[Finish last entry not already marked @done]" )
|
110
110
|
;;
|
111
111
|
did)
|
112
|
-
args=( {-a,--archive}"[Immediately archive the entry]" "(--at=)--at=}[Set finish date to specific date/time]" "(--started=)--started=}[Backdate start date by interval or set to time [4pm|20m|2h|"yesterday noon"]]" "(--date)--date}[Include date]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Include a note]" {-r,--remove}"[Remove @done tag]" {-s,--section=}"[Section]" {-t,--took=}"[Set completion date to start date plus interval]" {-u,--unfinished}"[Finish last entry not already marked @done]" )
|
112
|
+
args=( {-a,--archive}"[Immediately archive the entry]" "(--ask)--ask}[Prompt for note via multi-line input]" "(--at=)--at=}[Set finish date to specific date/time]" "(--started=)--started=}[Backdate start date by interval or set to time [4pm|20m|2h|"yesterday noon"]]" "(--date)--date}[Include date]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Include a note]" {-r,--remove}"[Remove @done tag]" {-s,--section=}"[Section]" {-t,--took=}"[Set completion date to start date plus interval]" {-u,--unfinished}"[Finish last entry not already marked @done]" )
|
113
113
|
;;
|
114
114
|
finish)
|
115
115
|
args=( {-a,--archive}"[Archive entries]" "(--at=)--at=}[Set finish date to specific date/time]" "(--auto)--auto}[Auto-generate finish dates from next entrys start times start time]" {-b,--back=}"[Backdate completed date to date string [4pm|20m|2h|yesterday noon]]" "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--date)--date}[Include date]" {-i,--interactive}"[Select item(s) to finish from a menu of matching entries]" "(--not)--not}[Finish items that *dont* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Remove done tag]" {-s,--section=}"[Section]" "(--search=)--search=}[Finish the last X entries matching search filter]" {-t,--took=}"[Set the completed date to the start date plus XX[hmd]]" "(--tag=)--tag=}[Finish the last X entries containing TAG]" {-u,--unfinished}"[Finish last entry]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
@@ -124,13 +124,13 @@ function _doing() {
|
|
124
124
|
args=( )
|
125
125
|
;;
|
126
126
|
import)
|
127
|
-
args=( "(--after=)--after=}[Import entries newer than date]" "(--autotag)--autotag}[Autotag entries]" "(--before=)--before=}[Import entries older than date]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-f,--from=}"[Date range to import]" "(--not)--not}[Import items that *dont* match search/tag/date filterst* match search/tag/date filters]" "(--only_timed)--only_timed}[Only import items with recorded time intervals]" "(--overlap)--overlap}[Allow entries that overlap existing times]" "(--prefix=)--prefix=}[Prefix entries with]" {-s,--section=}"[Target section]" "(--search=)--search=}[Only import items matching search]"
|
127
|
+
args=( "(--after=)--after=}[Import entries newer than date]" "(--autotag)--autotag}[Autotag entries]" "(--before=)--before=}[Import entries older than date]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-f,--from=}"[Date range to import]" "(--not)--not}[Import items that *dont* match search/tag/date filterst* match search/tag/date filters]" "(--only_timed)--only_timed}[Only import items with recorded time intervals]" "(--overlap)--overlap}[Allow entries that overlap existing times]" "(--prefix=)--prefix=}[Prefix entries with]" {-s,--section=}"[Target section]" "(--search=)--search=}[Only import items matching search]" {-t,--tag=}"[Tag all imported entries]" "(--type=)--type=}[Import type]" {-x,--exact}"[Force exact search string matching]" )
|
128
128
|
;;
|
129
129
|
last)
|
130
130
|
args=( "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--delete}"[Delete the last entry]" "(--duration)--duration}[Show elapsed time if entry is not tagged @done]" {-e,--editor}"[Edit entry with vim]" "(--not)--not}[Show items that *dont* match search string or tag filtert* match search string or tag filter]" {-s,--section=}"[Specify a section]" "(--search=)--search=}[Search filter]" "(--tag=)--tag=}[Tag filter]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
131
131
|
;;
|
132
132
|
later)
|
133
|
-
args=( {-b,--back=}"[Backdate start time to date string [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Note]" )
|
133
|
+
args=( "(--ask)--ask}[Prompt for note via multi-line input]" {-b,--back=}"[Backdate start time to date string [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Note]" )
|
134
134
|
;;
|
135
135
|
mark)
|
136
136
|
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" {-i,--interactive}"[Select item(s) to flag from a menu of matching entries]" "(--not)--not}[Flag items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-r,--remove}"[Remove flag]" {-s,--section=}"[Section]" "(--search=)--search=}[Flag the last entry matching search filter]" "(--tag=)--tag=}[Flag the last entry containing TAG]" {-u,--unfinished}"[Flag last entry]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
@@ -139,16 +139,16 @@ function _doing() {
|
|
139
139
|
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" {-i,--interactive}"[Select item(s) to flag from a menu of matching entries]" "(--not)--not}[Flag items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-r,--remove}"[Remove flag]" {-s,--section=}"[Section]" "(--search=)--search=}[Flag the last entry matching search filter]" "(--tag=)--tag=}[Flag the last entry containing TAG]" {-u,--unfinished}"[Flag last entry]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
140
140
|
;;
|
141
141
|
meanwhile)
|
142
|
-
args=( {-a,--archive}"[Archive previous @meanwhile entry]" {-b,--back=}"[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Note]" {-s,--section=}"[Section]" )
|
142
|
+
args=( {-a,--archive}"[Archive previous @meanwhile entry]" "(--ask)--ask}[Prompt for note via multi-line input]" {-b,--back=}"[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Note]" {-s,--section=}"[Section]" )
|
143
143
|
;;
|
144
144
|
note)
|
145
|
-
args=( "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit entry with vim]" {-i,--interactive}"[Select item for new note from a menu of matching entries]" "(--not)--not}[Add note to item that *doesnt* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Replace/Remove last entrys notes note]" {-s,--section=}"[Section]" "(--search=)--search=}[Add/remove note from last entry matching search filter]" "(--tag=)--tag=}[Add/remove note from last entry matching tag]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
145
|
+
args=( "(--ask)--ask}[Prompt for note via multi-line input]" "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit entry with vim]" {-i,--interactive}"[Select item for new note from a menu of matching entries]" "(--not)--not}[Add note to item that *doesnt* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Replace/Remove last entrys notes note]" {-s,--section=}"[Section]" "(--search=)--search=}[Add/remove note from last entry matching search filter]" "(--tag=)--tag=}[Add/remove note from last entry matching tag]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
146
146
|
;;
|
147
147
|
now)
|
148
|
-
args=( "(--started=)--started=}[Backdate start time [4pm|20m|2h|"yesterday noon"]]" {-e,--editor}"[Edit entry with vim]" {-f,--finish_last}"[Timed entry]" {-n,--note=}"[Include a note]" {-s,--section=}"[Section]" )
|
148
|
+
args=( "(--ask)--ask}[Prompt for note via multi-line input]" "(--started=)--started=}[Backdate start time [4pm|20m|2h|"yesterday noon"]]" {-e,--editor}"[Edit entry with vim]" {-f,--finish_last}"[Timed entry]" {-n,--note=}"[Include a note]" {-s,--section=}"[Section]" )
|
149
149
|
;;
|
150
150
|
next)
|
151
|
-
args=( "(--started=)--started=}[Backdate start time [4pm|20m|2h|"yesterday noon"]]" {-e,--editor}"[Edit entry with vim]" {-f,--finish_last}"[Timed entry]" {-n,--note=}"[Include a note]" {-s,--section=}"[Section]" )
|
151
|
+
args=( "(--ask)--ask}[Prompt for note via multi-line input]" "(--started=)--started=}[Backdate start time [4pm|20m|2h|"yesterday noon"]]" {-e,--editor}"[Edit entry with vim]" {-f,--finish_last}"[Timed entry]" {-n,--note=}"[Include a note]" {-s,--section=}"[Section]" )
|
152
152
|
;;
|
153
153
|
on)
|
154
154
|
args=( "(--duration)--duration}[Show elapsed time on entries without @done tag]" {-o,--output=}"[Output to export format]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show time totals at the end of output]" )
|
@@ -175,7 +175,7 @@ function _doing() {
|
|
175
175
|
args=( {-c,--column}"[List in single column]" )
|
176
176
|
;;
|
177
177
|
select)
|
178
|
-
args=( {-a,--archive}"[Archive selected items]" "(--after=)--after=}[Select from entries newer than date]" "(--resume)--resume}[Copy selection as a new entry with current time and no @done tag]" "(--before=)--before=}[Select from entries older than date]" {-c,--cancel}"[Cancel selected items]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--delete}"[Delete selected items]" {-e,--editor}"[Edit selected item(s)]" {-f,--finish}"[Add @done with current time to selected item(s)]" "(--flag)--flag}[Add flag to selected item(s)]" "(--force)--force}[Perform action without confirmation]" "(--from=)--from=}[Date range to show]" {-m,--move=}"[Move selected items to section]" "(--menu)--menu}[Use --no-menu to skip the interactive menu]" "(--not)--not}[Select items that *dont* match search/tag filterst* match search/tag filters]" {-o,--output=}"[Output entries to format]"
|
178
|
+
args=( {-a,--archive}"[Archive selected items]" "(--after=)--after=}[Select from entries newer than date]" "(--resume)--resume}[Copy selection as a new entry with current time and no @done tag]" "(--before=)--before=}[Select from entries older than date]" {-c,--cancel}"[Cancel selected items]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--delete}"[Delete selected items]" {-e,--editor}"[Edit selected item(s)]" {-f,--finish}"[Add @done with current time to selected item(s)]" "(--flag)--flag}[Add flag to selected item(s)]" "(--force)--force}[Perform action without confirmation]" "(--from=)--from=}[Date range to show]" {-m,--move=}"[Move selected items to section]" "(--menu)--menu}[Use --no-menu to skip the interactive menu]" "(--not)--not}[Select items that *dont* match search/tag filterst* match search/tag filters]" {-o,--output=}"[Output entries to format]" {-q,--query=}"[Initial search query for filtering]" {-r,--remove}"[Reverse -c]" {-s,--section=}"[Select from a specific section]" "(--save_to=)--save_to=}[Save selected entries to file using --output format]" "(--search=)--search=}[Select from entries matching search filter]" {-t,--tag=}"[Tag selected entries]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
179
179
|
;;
|
180
180
|
show)
|
181
181
|
args=( {-a,--age=}"[Age]" "(--after=)--after=}[Show entries newer than date]" {-b,--bool=}"[Tag boolean]" "(--before=)--before=}[Show entries older than date]" {-c,--count=}"[Max count to show]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--duration)--duration}[Show elapsed time on entries without @done tag]" "(--from=)--from=}[Date range to show]" {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" {-m,--menu}"[Select section or tag to display from a menu]" "(--not)--not}[Show items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--sort=}"[Sort order]" "(--search=)--search=}[Search filter]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag=)--tag=}[Tag filter]" "(--tag_order=)--tag_order=}[Tag sort direction]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" "(--val=)--val=}[Perform a tag value query]" {-x,--exact}"[Force exact search string matching]" )
|
data/lib/completion/doing.bash
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
_doing_again() {
|
2
2
|
|
3
3
|
if [[ "$token" == --* ]]; then
|
4
|
-
COMPREPLY=( $( compgen -W '--bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
|
4
|
+
COMPREPLY=( $( compgen -W '--ask --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
|
5
5
|
elif [[ "$token" == -* ]]; then
|
6
|
-
COMPREPLY=( $( compgen -W '-e -i -n -s -x --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
|
6
|
+
COMPREPLY=( $( compgen -W '-e -i -n -s -x --ask --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
|
7
7
|
|
8
8
|
fi
|
9
9
|
}
|
@@ -81,9 +81,9 @@ _doing_config() {
|
|
81
81
|
_doing_done() {
|
82
82
|
|
83
83
|
if [[ "$token" == --* ]]; then
|
84
|
-
COMPREPLY=( $( compgen -W '--archive --at --started --date --editor --note --remove --section --took --unfinished' -- $token ) )
|
84
|
+
COMPREPLY=( $( compgen -W '--archive --ask --at --started --date --editor --note --remove --section --took --unfinished' -- $token ) )
|
85
85
|
elif [[ "$token" == -* ]]; then
|
86
|
-
COMPREPLY=( $( compgen -W '-a -e -n -r -s -t -u --archive --at --started --date --editor --note --remove --section --took --unfinished' -- $token ) )
|
86
|
+
COMPREPLY=( $( compgen -W '-a -e -n -r -s -t -u --archive --ask --at --started --date --editor --note --remove --section --took --unfinished' -- $token ) )
|
87
87
|
|
88
88
|
fi
|
89
89
|
}
|
@@ -123,7 +123,7 @@ _doing_import() {
|
|
123
123
|
if [[ "$token" == --* ]]; then
|
124
124
|
COMPREPLY=( $( compgen -W '--after --autotag --before --case --from --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
|
125
125
|
elif [[ "$token" == -* ]]; then
|
126
|
-
COMPREPLY=( $( compgen -W '-f -s -x --after --autotag --before --case --from --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
|
126
|
+
COMPREPLY=( $( compgen -W '-f -s -t -x --after --autotag --before --case --from --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
|
127
127
|
|
128
128
|
fi
|
129
129
|
}
|
@@ -141,9 +141,9 @@ _doing_last() {
|
|
141
141
|
_doing_later() {
|
142
142
|
|
143
143
|
if [[ "$token" == --* ]]; then
|
144
|
-
COMPREPLY=( $( compgen -W '--back --editor --note' -- $token ) )
|
144
|
+
COMPREPLY=( $( compgen -W '--ask --back --editor --note' -- $token ) )
|
145
145
|
elif [[ "$token" == -* ]]; then
|
146
|
-
COMPREPLY=( $( compgen -W '-b -e -n --back --editor --note' -- $token ) )
|
146
|
+
COMPREPLY=( $( compgen -W '-b -e -n --ask --back --editor --note' -- $token ) )
|
147
147
|
|
148
148
|
fi
|
149
149
|
}
|
@@ -161,9 +161,9 @@ _doing_mark() {
|
|
161
161
|
_doing_meanwhile() {
|
162
162
|
|
163
163
|
if [[ "$token" == --* ]]; then
|
164
|
-
COMPREPLY=( $( compgen -W '--archive --back --editor --note --section' -- $token ) )
|
164
|
+
COMPREPLY=( $( compgen -W '--archive --ask --back --editor --note --section' -- $token ) )
|
165
165
|
elif [[ "$token" == -* ]]; then
|
166
|
-
COMPREPLY=( $( compgen -W '-a -b -e -n -s --archive --back --editor --note --section' -- $token ) )
|
166
|
+
COMPREPLY=( $( compgen -W '-a -b -e -n -s --archive --ask --back --editor --note --section' -- $token ) )
|
167
167
|
|
168
168
|
fi
|
169
169
|
}
|
@@ -171,9 +171,9 @@ _doing_meanwhile() {
|
|
171
171
|
_doing_note() {
|
172
172
|
|
173
173
|
if [[ "$token" == --* ]]; then
|
174
|
-
COMPREPLY=( $( compgen -W '--bool --case --editor --interactive --not --remove --section --search --tag --val --exact' -- $token ) )
|
174
|
+
COMPREPLY=( $( compgen -W '--ask --bool --case --editor --interactive --not --remove --section --search --tag --val --exact' -- $token ) )
|
175
175
|
elif [[ "$token" == -* ]]; then
|
176
|
-
COMPREPLY=( $( compgen -W '-e -i -r -s -x --bool --case --editor --interactive --not --remove --section --search --tag --val --exact' -- $token ) )
|
176
|
+
COMPREPLY=( $( compgen -W '-e -i -r -s -x --ask --bool --case --editor --interactive --not --remove --section --search --tag --val --exact' -- $token ) )
|
177
177
|
|
178
178
|
fi
|
179
179
|
}
|
@@ -181,9 +181,9 @@ _doing_note() {
|
|
181
181
|
_doing_now() {
|
182
182
|
|
183
183
|
if [[ "$token" == --* ]]; then
|
184
|
-
COMPREPLY=( $( compgen -W '--started --editor --finish_last --note --section' -- $token ) )
|
184
|
+
COMPREPLY=( $( compgen -W '--ask --started --editor --finish_last --note --section' -- $token ) )
|
185
185
|
elif [[ "$token" == -* ]]; then
|
186
|
-
COMPREPLY=( $( compgen -W '-e -f -n -s --started --editor --finish_last --note --section' -- $token ) )
|
186
|
+
COMPREPLY=( $( compgen -W '-e -f -n -s --ask --started --editor --finish_last --note --section' -- $token ) )
|
187
187
|
|
188
188
|
fi
|
189
189
|
}
|
@@ -261,9 +261,9 @@ _doing_sections() {
|
|
261
261
|
_doing_select() {
|
262
262
|
|
263
263
|
if [[ "$token" == --* ]]; then
|
264
|
-
COMPREPLY=( $( compgen -W '--archive --after --resume --before --cancel --case --delete --editor --finish --flag --force --from --move --menu --not --output --
|
264
|
+
COMPREPLY=( $( compgen -W '--archive --after --resume --before --cancel --case --delete --editor --finish --flag --force --from --move --menu --not --output --query --remove --section --save_to --search --tag --val --exact' -- $token ) )
|
265
265
|
elif [[ "$token" == -* ]]; then
|
266
|
-
COMPREPLY=( $( compgen -W '-a -c -d -e -f -m -o -r -s -t -x --archive --after --resume --before --cancel --case --delete --editor --finish --flag --force --from --move --menu --not --output --
|
266
|
+
COMPREPLY=( $( compgen -W '-a -c -d -e -f -m -o -q -r -s -t -x --archive --after --resume --before --cancel --case --delete --editor --finish --flag --force --from --move --menu --not --output --query --remove --section --save_to --search --tag --val --exact' -- $token ) )
|
267
267
|
|
268
268
|
fi
|
269
269
|
}
|
data/lib/completion/doing.fish
CHANGED
@@ -99,12 +99,13 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'view' -d Display\ a\ user
|
|
99
99
|
complete -xc doing -n '__fish_doing_needs_command' -a 'views' -d List\ available\ custom\ views
|
100
100
|
complete -xc doing -n '__fish_doing_needs_command' -a 'wiki' -d Output\ a\ tag\ wiki
|
101
101
|
complete -xc doing -n '__fish_doing_needs_command' -a 'yesterday' -d List\ entries\ from\ yesterday
|
102
|
+
complete -c doing -l ask -f -n '__fish_doing_using_command again resume' -d Prompt\ for\ note\ via\ multi-line\ input
|
102
103
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command again resume' -d Boolean\ used\ to\ combine\ multiple\ tags
|
103
104
|
complete -c doing -l case -f -r -n '__fish_doing_using_command again resume' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
104
105
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command again resume' -d Edit\ duplicated\ entry\ with\ vim\ before\ adding
|
105
106
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command again resume' -d Select\ item\ to\ resume\ from\ a\ menu\ of\ matching\ entries
|
106
107
|
complete -c doing -l in -f -r -n '__fish_doing_using_command again resume' -d Add\ new\ entry\ to\ section
|
107
|
-
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command again resume' -d
|
108
|
+
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command again resume' -d Add\ a\ note
|
108
109
|
complete -c doing -l not -f -n '__fish_doing_using_command again resume' -d Resume\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
109
110
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command again resume' -d Get\ last\ entry\ from\ a\ specific\ section
|
110
111
|
complete -c doing -l search -f -r -n '__fish_doing_using_command again resume' -d Repeat\ last\ entry\ matching\ search
|
@@ -146,6 +147,7 @@ complete -c doing -l type -s t -f -r -n '__fish_doing_using_command completion'
|
|
146
147
|
complete -c doing -l dump -s d -f -n '__fish_doing_using_command config' -d DEPRECATED
|
147
148
|
complete -c doing -l update -s u -f -n '__fish_doing_using_command config' -d DEPRECATED
|
148
149
|
complete -c doing -l archive -s a -f -n '__fish_doing_using_command done did' -d Immediately\ archive\ the\ entry
|
150
|
+
complete -c doing -l ask -f -n '__fish_doing_using_command done did' -d Prompt\ for\ note\ via\ multi-line\ input
|
149
151
|
complete -c doing -l at -f -r -n '__fish_doing_using_command done did' -d Set\ finish\ date\ to\ specific\ date/time
|
150
152
|
complete -c doing -l started -f -r -n '__fish_doing_using_command done did' -d Backdate\ start\ date\ by\ interval\ or\ set\ to\ time\ \[4pm\|20m\|2h\|\"yesterday\ noon\"\]
|
151
153
|
complete -c doing -l date -f -n '__fish_doing_using_command done did' -d Include\ date
|
@@ -202,7 +204,7 @@ complete -c doing -l overlap -f -n '__fish_doing_using_command import' -d Allo
|
|
202
204
|
complete -c doing -l prefix -f -r -n '__fish_doing_using_command import' -d Prefix\ entries\ with
|
203
205
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command import' -d Target\ section
|
204
206
|
complete -c doing -l search -f -r -n '__fish_doing_using_command import' -d Only\ import\ items\ matching\ search
|
205
|
-
complete -c doing -l tag
|
207
|
+
complete -c doing -l tag -s t -f -r -n '__fish_doing_using_command import' -d Tag\ all\ imported\ entries
|
206
208
|
complete -c doing -l type -f -r -n '__fish_doing_using_command import' -d Import\ type
|
207
209
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command import' -d Force\ exact\ search\ string\ matching
|
208
210
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command last' -d Tag\ boolean
|
@@ -216,6 +218,7 @@ complete -c doing -l search -f -r -n '__fish_doing_using_command last' -d Searc
|
|
216
218
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command last' -d Tag\ filter
|
217
219
|
complete -c doing -l val -f -r -n '__fish_doing_using_command last' -d Perform\ a\ tag\ value\ query
|
218
220
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command last' -d Force\ exact\ search\ string\ matching
|
221
|
+
complete -c doing -l ask -f -n '__fish_doing_using_command later' -d Prompt\ for\ note\ via\ multi-line\ input
|
219
222
|
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command later' -d Backdate\ start\ time\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
220
223
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command later' -d Edit\ entry\ with\ vim
|
221
224
|
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command later' -d Note
|
@@ -234,10 +237,12 @@ complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command mark fla
|
|
234
237
|
complete -c doing -l val -f -r -n '__fish_doing_using_command mark flag' -d Perform\ a\ tag\ value\ query
|
235
238
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command mark flag' -d Force\ exact\ search\ string\ matching
|
236
239
|
complete -c doing -l archive -s a -f -n '__fish_doing_using_command meanwhile' -d Archive\ previous\ @meanwhile\ entry
|
240
|
+
complete -c doing -l ask -f -n '__fish_doing_using_command meanwhile' -d Prompt\ for\ note\ via\ multi-line\ input
|
237
241
|
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command meanwhile' -d Backdate\ start\ date\ for\ new\ entry\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
238
242
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command meanwhile' -d Edit\ entry\ with\ vim
|
239
243
|
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command meanwhile' -d Note
|
240
244
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command meanwhile' -d Section
|
245
|
+
complete -c doing -l ask -f -n '__fish_doing_using_command note' -d Prompt\ for\ note\ via\ multi-line\ input
|
241
246
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command note' -d Boolean
|
242
247
|
complete -c doing -l case -f -r -n '__fish_doing_using_command note' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
243
248
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command note' -d Edit\ entry\ with\ vim
|
@@ -249,6 +254,7 @@ complete -c doing -l search -f -r -n '__fish_doing_using_command note' -d Add/r
|
|
249
254
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command note' -d Add/remove\ note\ from\ last\ entry\ matching\ tag
|
250
255
|
complete -c doing -l val -f -r -n '__fish_doing_using_command note' -d Perform\ a\ tag\ value\ query
|
251
256
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command note' -d Force\ exact\ search\ string\ matching
|
257
|
+
complete -c doing -l ask -f -n '__fish_doing_using_command now next' -d Prompt\ for\ note\ via\ multi-line\ input
|
252
258
|
complete -c doing -l started -f -r -n '__fish_doing_using_command now next' -d Backdate\ start\ time\ \[4pm\|20m\|2h\|\"yesterday\ noon\"\]
|
253
259
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command now next' -d Edit\ entry\ with\ vim
|
254
260
|
complete -c doing -l finish_last -s f -f -n '__fish_doing_using_command now next' -d Timed\ entry
|
@@ -308,10 +314,11 @@ complete -c doing -l move -s m -f -r -n '__fish_doing_using_command select' -d M
|
|
308
314
|
complete -c doing -l menu -f -n '__fish_doing_using_command select' -d Use\ --no-menu\ to\ skip\ the\ interactive\ menu
|
309
315
|
complete -c doing -l not -f -n '__fish_doing_using_command select' -d Select\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
310
316
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command select' -d Output\ entries\ to\ format
|
311
|
-
complete -c doing -l
|
317
|
+
complete -c doing -l query -s q -f -r -n '__fish_doing_using_command select' -d Initial\ search\ query\ for\ filtering
|
312
318
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command select' -d Reverse\ -c
|
313
319
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command select' -d Select\ from\ a\ specific\ section
|
314
320
|
complete -c doing -l save_to -f -r -n '__fish_doing_using_command select' -d Save\ selected\ entries\ to\ file\ using\ --output\ format
|
321
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command select' -d Select\ from\ entries\ matching\ search\ filter
|
315
322
|
complete -c doing -l tag -s t -f -r -n '__fish_doing_using_command select' -d Tag\ selected\ entries
|
316
323
|
complete -c doing -l val -f -r -n '__fish_doing_using_command select' -d Perform\ a\ tag\ value\ query
|
317
324
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command select' -d Force\ exact\ search\ string\ matching
|
data/lib/doing/item.rb
CHANGED
@@ -162,6 +162,11 @@ module Doing
|
|
162
162
|
@title.scan(/(?<= |\A)@([^\s(]+)/).map { |tag| tag[0] }.sort.uniq
|
163
163
|
end
|
164
164
|
|
165
|
+
##
|
166
|
+
## convert tags on item to an array with @ symbols removed
|
167
|
+
##
|
168
|
+
## @return [Array] array of tags
|
169
|
+
##
|
165
170
|
def tag_array
|
166
171
|
tags.tags_to_array
|
167
172
|
end
|
@@ -220,6 +225,14 @@ module Doing
|
|
220
225
|
negate ? !matches : matches
|
221
226
|
end
|
222
227
|
|
228
|
+
##
|
229
|
+
## Determine if case should be ignored for searches
|
230
|
+
##
|
231
|
+
## @param search [String] The search string
|
232
|
+
## @param case_type [Symbol] The case type
|
233
|
+
##
|
234
|
+
## @return [Boolean] case should be ignored
|
235
|
+
##
|
223
236
|
def ignore_case(search, case_type)
|
224
237
|
(case_type == :smart && search !~ /[A-Z]/) || case_type == :ignore
|
225
238
|
end
|
@@ -279,10 +292,22 @@ module Doing
|
|
279
292
|
negate ? !matches : matches
|
280
293
|
end
|
281
294
|
|
295
|
+
##
|
296
|
+
## Test if item is included in never_finish config and
|
297
|
+
## thus should not receive a @done tag
|
298
|
+
##
|
299
|
+
## @return [Boolean] item should receive @done tag
|
300
|
+
##
|
282
301
|
def should_finish?
|
283
302
|
should?('never_finish')
|
284
303
|
end
|
285
304
|
|
305
|
+
##
|
306
|
+
## Test if item is included in never_time config and
|
307
|
+
## thus should not receive a date on the @done tag
|
308
|
+
##
|
309
|
+
## @return [Boolean] item should receive @done date
|
310
|
+
##
|
286
311
|
def should_time?
|
287
312
|
should?('never_time')
|
288
313
|
end
|
@@ -61,7 +61,19 @@ module Doing
|
|
61
61
|
title.strip!
|
62
62
|
new_entry = Item.new(start_time, title, section)
|
63
63
|
new_entry.note = entry['notes'].split(/\n/).map(&:chomp) if entry.key?('notes')
|
64
|
-
|
64
|
+
|
65
|
+
is_match = true
|
66
|
+
|
67
|
+
if options[:search]
|
68
|
+
is_match = new_entry.search(options[:search], case_type: options[:date], negate: options[:not])
|
69
|
+
end
|
70
|
+
|
71
|
+
if is_match && options[:date_filter]
|
72
|
+
is_match = start_time > options[:date_filter][0] && start_time < options[:date_filter][1]
|
73
|
+
is_match = options[:not] ? !is_match : is_match
|
74
|
+
end
|
75
|
+
|
76
|
+
new_items.push(new_entry) if is_match
|
65
77
|
end
|
66
78
|
total = new_items.count
|
67
79
|
|
@@ -68,7 +68,18 @@ module Doing
|
|
68
68
|
new_item = Item.new(item.date, title, section)
|
69
69
|
new_item.note = item.note
|
70
70
|
|
71
|
-
|
71
|
+
is_match = true
|
72
|
+
|
73
|
+
if options[:search]
|
74
|
+
is_match = new_item.search(options[:search], case_type: options[:case], negate: options[:not])
|
75
|
+
end
|
76
|
+
|
77
|
+
if is_match && options[:date_filter]
|
78
|
+
is_match = new_item.date > options[:date_filter][0] && new_item.date < options[:date_filter][1]
|
79
|
+
is_match = options[:not] ? !is_match : is_match
|
80
|
+
end
|
81
|
+
|
82
|
+
imported.push(new_item) if is_match
|
72
83
|
end
|
73
84
|
|
74
85
|
dups = new_items.count - imported.count
|
@@ -63,7 +63,19 @@ module Doing
|
|
63
63
|
title.strip!
|
64
64
|
new_item = Item.new(start_time, title, section)
|
65
65
|
new_item.note.add(entry['notes']) if entry.key?('notes')
|
66
|
-
|
66
|
+
|
67
|
+
is_match = true
|
68
|
+
|
69
|
+
if options[:search]
|
70
|
+
is_match = new_item.search(options[:search], case_type: options[:case], negate: options[:not])
|
71
|
+
end
|
72
|
+
|
73
|
+
if is_match && options[:date_filter]
|
74
|
+
is_match = start_time > options[:date_filter][0] && start_time < options[:date_filter][1]
|
75
|
+
is_match = options[:not] ? !is_match : is_match
|
76
|
+
end
|
77
|
+
|
78
|
+
new_items.push(new_item) if is_match
|
67
79
|
end
|
68
80
|
total = new_items.count
|
69
81
|
skipped = data.count - total
|
data/lib/doing/prompt.rb
CHANGED
@@ -23,6 +23,18 @@ module Doing
|
|
23
23
|
$stdin.gets.strip
|
24
24
|
end
|
25
25
|
|
26
|
+
def request_lines(prompt: 'Enter text')
|
27
|
+
ask_note = []
|
28
|
+
reader = TTY::Reader.new(interrupt: -> { raise Errors::UserCancelled }, track_history: false)
|
29
|
+
puts "#{boldgreen(prompt.sub(/:?$/, ':'))} #{yellow('Hit return for a new line, ')}#{boldwhite('enter a blank line (')}#{boldyellow('return twice')}#{boldwhite(') to end editing')}"
|
30
|
+
loop do
|
31
|
+
res = reader.read_line(green('> '))
|
32
|
+
break if res.strip.empty?
|
33
|
+
|
34
|
+
ask_note.push(res)
|
35
|
+
end
|
36
|
+
ask_note.join("\n").strip
|
37
|
+
end
|
26
38
|
|
27
39
|
##
|
28
40
|
## Ask a yes or no question in the terminal
|
@@ -205,7 +217,7 @@ module Doing
|
|
205
217
|
out = [
|
206
218
|
format("%#{pad}d", i),
|
207
219
|
') ',
|
208
|
-
format('%
|
220
|
+
format('%16s', item.date.strftime('%Y-%m-%d %H:%M')),
|
209
221
|
' | ',
|
210
222
|
item.title
|
211
223
|
]
|
data/lib/doing/time.rb
CHANGED
@@ -8,10 +8,10 @@ module Doing
|
|
8
8
|
strftime('%_I:%M%P')
|
9
9
|
elsif self > (Date.today - 6).to_time
|
10
10
|
strftime('%a %_I:%M%P')
|
11
|
-
elsif self.year == Date.today.year
|
11
|
+
elsif self.year == Date.today.year || (self.year + 1 == Date.today.year && self.month > Date.today.month)
|
12
12
|
strftime('%m/%d %_I:%M%P')
|
13
13
|
else
|
14
|
-
strftime('%m/%d/%
|
14
|
+
strftime('%m/%d/%y %_I:%M%P')
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -384,10 +384,13 @@ module Doing
|
|
384
384
|
end
|
385
385
|
|
386
386
|
##
|
387
|
-
## Remove items from
|
387
|
+
## Remove items from an array that already exist in
|
388
|
+
## @content based on start and end times
|
388
389
|
##
|
389
|
-
## @param items [Array] The items to
|
390
|
-
##
|
390
|
+
## @param items [Array] The items to
|
391
|
+
## deduplicate
|
392
|
+
## @param no_overlap [Boolean] Remove items with
|
393
|
+
## overlapping time spans
|
391
394
|
##
|
392
395
|
def dedup(items, no_overlap: false)
|
393
396
|
items.delete_if do |item|
|
@@ -894,8 +897,8 @@ module Doing
|
|
894
897
|
opt[:search] = search
|
895
898
|
end
|
896
899
|
|
897
|
-
opt[:query] = opt[:search] if opt[:search] && !opt[:query]
|
898
|
-
opt[:query] = "!#{opt[:query]}" if opt[:not]
|
900
|
+
# opt[:query] = opt[:search] if opt[:search] && !opt[:query]
|
901
|
+
opt[:query] = "!#{opt[:query]}" if opt[:query] && opt[:not]
|
899
902
|
opt[:multiple] = true
|
900
903
|
opt[:show_if_single] = true
|
901
904
|
filter_options = %i[after before case date_filter from fuzzy not search section val].each_with_object({}) {
|
@@ -2227,6 +2230,8 @@ EOS
|
|
2227
2230
|
break
|
2228
2231
|
end
|
2229
2232
|
|
2233
|
+
logger.debug('Output:', "#{items.count} #{items.count == 1 ? 'item' : 'items'} shown")
|
2234
|
+
|
2230
2235
|
out
|
2231
2236
|
end
|
2232
2237
|
|