doing 2.0.11 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +5 -15
- data/README.md +1 -1
- data/Rakefile +2 -0
- data/bin/doing +57 -36
- data/doing.gemspec +2 -1
- data/doing.rdoc +1 -71
- data/lib/completion/_doing.zsh +24 -20
- data/lib/completion/doing.bash +41 -30
- data/lib/completion/doing.fish +64 -1
- data/lib/doing/item.rb +18 -17
- data/lib/doing/plugins/export/template_export.rb +15 -9
- data/lib/doing/string.rb +22 -9
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +39 -13
- data/lib/doing.rb +1 -1
- metadata +16 -22
data/lib/completion/doing.fish
CHANGED
|
@@ -64,6 +64,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'autotag' -d Autotag\ last
|
|
|
64
64
|
complete -xc doing -n '__fish_doing_needs_command' -a 'cancel' -d End\ last\ X\ entries\ with\ no\ time\ tracked
|
|
65
65
|
complete -xc doing -n '__fish_doing_needs_command' -a 'choose' -d Select\ a\ section\ to\ display\ from\ a\ menu
|
|
66
66
|
complete -xc doing -n '__fish_doing_needs_command' -a 'colors' -d List\ available\ color\ variables\ for\ configuration\ templates\ and\ views
|
|
67
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'completion' -d Generate\ shell\ completion\ scripts
|
|
67
68
|
complete -xc doing -n '__fish_doing_needs_command' -a 'config' -d Edit\ the\ configuration\ file\ or\ output\ a\ value\ from\ it
|
|
68
69
|
complete -xc doing -n '__fish_doing_needs_command' -a 'done did' -d Add\ a\ completed\ item\ with\ @done\(date\)
|
|
69
70
|
complete -xc doing -n '__fish_doing_needs_command' -a 'finish' -d Mark\ last\ X\ entries\ as\ @done
|
|
@@ -96,20 +97,28 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'views' -d List\ available
|
|
|
96
97
|
complete -xc doing -n '__fish_doing_needs_command' -a 'wiki' -d Output\ a\ tag\ wiki
|
|
97
98
|
complete -xc doing -n '__fish_doing_needs_command' -a 'yesterday' -d List\ entries\ from\ yesterday
|
|
98
99
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command again resume' -d Boolean\ used\ to\ combine\ multiple\ tags
|
|
100
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command again resume' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
99
101
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command again resume' -d Edit\ duplicated\ entry\ with\ vim\ before\ adding
|
|
102
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command again resume' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
100
103
|
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
|
|
101
104
|
complete -c doing -l in -f -r -n '__fish_doing_using_command again resume' -d Add\ new\ entry\ to\ section
|
|
102
105
|
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command again resume' -d Note
|
|
106
|
+
complete -c doing -l not -f -n '__fish_doing_using_command again resume' -d Resume\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
103
107
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command again resume' -d Get\ last\ entry\ from\ a\ specific\ section
|
|
104
108
|
complete -c doing -l search -f -r -n '__fish_doing_using_command again resume' -d Repeat\ last\ entry\ matching\ search
|
|
105
109
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command again resume' -d Repeat\ last\ entry\ matching\ tags
|
|
110
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command again resume' -d Force\ exact\ search\ string\ matching
|
|
106
111
|
complete -c doing -l before -f -r -n '__fish_doing_using_command archive move' -d Archive\ entries\ older\ than\ date
|
|
107
112
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command archive move' -d Tag\ boolean
|
|
113
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command archive move' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
114
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command archive move' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
108
115
|
complete -c doing -l keep -s k -f -r -n '__fish_doing_using_command archive move' -d How\ many\ items\ to\ keep
|
|
109
116
|
complete -c doing -l label -f -n '__fish_doing_using_command archive move' -d Label\ moved\ items\ with\ @from\(SECTION_NAME\)
|
|
117
|
+
complete -c doing -l not -f -n '__fish_doing_using_command archive move' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string
|
|
110
118
|
complete -c doing -l search -f -r -n '__fish_doing_using_command archive move' -d Search\ filter
|
|
111
119
|
complete -c doing -l to -s t -f -r -n '__fish_doing_using_command archive move' -d Move\ entries\ to
|
|
112
120
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command archive move' -d Tag\ filter
|
|
121
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command archive move' -d Force\ exact\ search\ string\ matching
|
|
113
122
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command autotag' -d Boolean
|
|
114
123
|
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command autotag' -d How\ many\ recent\ entries\ to\ autotag
|
|
115
124
|
complete -c doing -l force -f -n '__fish_doing_using_command autotag' -d Don\'t\ ask\ permission\ to\ autotag\ all\ entries\ when\ count\ is\ 0
|
|
@@ -120,10 +129,17 @@ complete -c doing -l tag -f -r -n '__fish_doing_using_command autotag' -d Autot
|
|
|
120
129
|
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command autotag' -d Autotag\ last\ entry
|
|
121
130
|
complete -c doing -l archive -s a -f -n '__fish_doing_using_command cancel' -d Archive\ entries
|
|
122
131
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command cancel' -d Boolean
|
|
132
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command cancel' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
133
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command cancel' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
123
134
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command cancel' -d Select\ item\(s\)\ to\ cancel\ from\ a\ menu\ of\ matching\ entries
|
|
135
|
+
complete -c doing -l not -f -n '__fish_doing_using_command cancel' -d Finish\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
124
136
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command cancel' -d Section
|
|
137
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command cancel' -d Cancel\ the\ last\ X\ entries\ matching\ search\ filter
|
|
125
138
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command cancel' -d Cancel\ the\ last\ X\ entries\ containing\ TAG
|
|
126
139
|
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command cancel' -d Cancel\ last\ entry
|
|
140
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command cancel' -d Force\ exact\ search\ string\ matching
|
|
141
|
+
complete -c doing -l file -s f -f -r -n '__fish_doing_using_command completion' -d File\ to\ write\ output\ to
|
|
142
|
+
complete -c doing -l type -s t -f -r -n '__fish_doing_using_command completion' -d Shell\ to\ generate\ for
|
|
127
143
|
complete -c doing -F -n '__fish_doing_using_command config'
|
|
128
144
|
complete -c doing -l dump -s d -f -n '__fish_doing_using_command config' -d Show\ a\ config\ key\ value\ based\ on\ arguments
|
|
129
145
|
complete -c doing -l editor -s e -f -r -n '__fish_doing_using_command config' -d Editor\ to\ use
|
|
@@ -144,28 +160,39 @@ complete -c doing -l at -f -r -n '__fish_doing_using_command finish' -d Set\ fi
|
|
|
144
160
|
complete -c doing -l auto -f -n '__fish_doing_using_command finish' -d Auto-generate\ finish\ dates\ from\ next\ entry\'s\ start\ time
|
|
145
161
|
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command finish' -d Backdate\ completed\ date\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
|
146
162
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command finish' -d Boolean
|
|
163
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command finish' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
147
164
|
complete -c doing -l date -f -n '__fish_doing_using_command finish' -d Include\ date
|
|
165
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command finish' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
148
166
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command finish' -d Select\ item\(s\)\ to\ finish\ from\ a\ menu\ of\ matching\ entries
|
|
167
|
+
complete -c doing -l not -f -n '__fish_doing_using_command finish' -d Finish\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
149
168
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command finish' -d Remove\ done\ tag
|
|
150
169
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command finish' -d Section
|
|
151
170
|
complete -c doing -l search -f -r -n '__fish_doing_using_command finish' -d Finish\ the\ last\ X\ entries\ matching\ search\ filter
|
|
152
171
|
complete -c doing -l took -s t -f -r -n '__fish_doing_using_command finish' -d Set\ the\ completed\ date\ to\ the\ start\ date\ plus\ XX\[hmd\]
|
|
153
172
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command finish' -d Finish\ the\ last\ X\ entries\ containing\ TAG
|
|
154
173
|
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command finish' -d Finish\ last\ entry
|
|
174
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command finish' -d Force\ exact\ search\ string\ matching
|
|
155
175
|
complete -c doing -l after -f -r -n '__fish_doing_using_command grep search' -d Constrain\ search\ to\ entries\ newer\ than\ date
|
|
156
176
|
complete -c doing -l before -f -r -n '__fish_doing_using_command grep search' -d Constrain\ search\ to\ entries\ older\ than\ date
|
|
177
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command grep search' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
178
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command grep search' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
157
179
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command grep search' -d Display\ an\ interactive\ menu\ of\ results\ to\ perform\ further\ operations
|
|
180
|
+
complete -c doing -l not -f -n '__fish_doing_using_command grep search' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string
|
|
158
181
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command grep search' -d Output\ to\ export\ format
|
|
159
182
|
complete -c doing -l only_timed -f -n '__fish_doing_using_command grep search' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
|
160
183
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command grep search' -d Section
|
|
161
184
|
complete -c doing -l times -s t -f -n '__fish_doing_using_command grep search' -d Show\ time\ intervals\ on\ @done\ tasks
|
|
162
185
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command grep search' -d Sort\ tags\ by
|
|
163
186
|
complete -c doing -l totals -f -n '__fish_doing_using_command grep search' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
|
187
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command grep search' -d Force\ exact\ string\ matching
|
|
164
188
|
complete -c doing -F -n '__fish_doing_using_command import'
|
|
165
189
|
complete -c doing -l after -f -r -n '__fish_doing_using_command import' -d Import\ entries\ newer\ than\ date
|
|
166
190
|
complete -c doing -l autotag -f -n '__fish_doing_using_command import' -d Autotag\ entries
|
|
167
191
|
complete -c doing -l before -f -r -n '__fish_doing_using_command import' -d Import\ entries\ older\ than\ date
|
|
192
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command import' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
168
193
|
complete -c doing -l from -s f -f -r -n '__fish_doing_using_command import' -d Date\ range\ to\ import
|
|
194
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command import' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
195
|
+
complete -c doing -l not -f -n '__fish_doing_using_command import' -d Import\ items\ that\ \*don\'t\*\ match\ search/tag/date\ filters
|
|
169
196
|
complete -c doing -l only_timed -f -n '__fish_doing_using_command import' -d Only\ import\ items\ with\ recorded\ time\ intervals
|
|
170
197
|
complete -c doing -l overlap -f -n '__fish_doing_using_command import' -d Allow\ entries\ that\ overlap\ existing\ times
|
|
171
198
|
complete -c doing -l prefix -f -r -n '__fish_doing_using_command import' -d Prefix\ entries\ with
|
|
@@ -173,36 +200,49 @@ complete -c doing -l section -s s -f -r -n '__fish_doing_using_command import' -
|
|
|
173
200
|
complete -c doing -l search -f -r -n '__fish_doing_using_command import' -d Only\ import\ items\ matching\ search
|
|
174
201
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command import' -d Tag\ all\ imported\ entries
|
|
175
202
|
complete -c doing -l type -f -r -n '__fish_doing_using_command import' -d Import\ type
|
|
203
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command import' -d Force\ exact\ search\ string\ matching
|
|
176
204
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command last' -d Tag\ boolean
|
|
205
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command last' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
177
206
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command last' -d Edit\ entry\ with\ vim
|
|
207
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command last' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
208
|
+
complete -c doing -l not -f -n '__fish_doing_using_command last' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string\ or\ tag\ filter
|
|
178
209
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command last' -d Specify\ a\ section
|
|
179
210
|
complete -c doing -l search -f -r -n '__fish_doing_using_command last' -d Search\ filter
|
|
180
211
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command last' -d Tag\ filter
|
|
212
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command last' -d Force\ exact\ search\ string\ matching
|
|
181
213
|
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\]
|
|
182
214
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command later' -d Edit\ entry\ with\ vim
|
|
183
215
|
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command later' -d Note
|
|
184
216
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command mark flag' -d Boolean
|
|
185
217
|
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command mark flag' -d How\ many\ recent\ entries\ to\ tag
|
|
218
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command mark flag' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
186
219
|
complete -c doing -l date -s d -f -n '__fish_doing_using_command mark flag' -d Include\ current\ date/time\ with\ tag
|
|
187
220
|
complete -c doing -l force -f -n '__fish_doing_using_command mark flag' -d Don\'t\ ask\ permission\ to\ flag\ all\ entries\ when\ count\ is\ 0
|
|
221
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command mark flag' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
188
222
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command mark flag' -d Select\ item\(s\)\ to\ flag\ from\ a\ menu\ of\ matching\ entries
|
|
223
|
+
complete -c doing -l not -f -n '__fish_doing_using_command mark flag' -d Flag\ items\ that\ \*don\'t\*\ match\ search/tag/date\ filters
|
|
189
224
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command mark flag' -d Remove\ flag
|
|
190
225
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command mark flag' -d Section
|
|
191
226
|
complete -c doing -l search -f -r -n '__fish_doing_using_command mark flag' -d Flag\ the\ last\ entry\ matching\ search\ filter
|
|
192
227
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command mark flag' -d Flag\ the\ last\ entry\ containing\ TAG
|
|
193
228
|
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command mark flag' -d Flag\ last\ entry
|
|
229
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command mark flag' -d Force\ exact\ search\ string\ matching
|
|
194
230
|
complete -c doing -l archive -s a -f -n '__fish_doing_using_command meanwhile' -d Archive\ previous\ @meanwhile\ entry
|
|
195
231
|
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\]
|
|
196
232
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command meanwhile' -d Edit\ entry\ with\ vim
|
|
197
233
|
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command meanwhile' -d Note
|
|
198
234
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command meanwhile' -d Section
|
|
199
235
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command note' -d Boolean
|
|
236
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command note' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
200
237
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command note' -d Edit\ entry\ with\ vim
|
|
238
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command note' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
201
239
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command note' -d Select\ item\ for\ new\ note\ from\ a\ menu\ of\ matching\ entries
|
|
240
|
+
complete -c doing -l not -f -n '__fish_doing_using_command note' -d Add\ note\ to\ item\ that\ \*doesn\'t\*\ match\ search/tag\ filters
|
|
202
241
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command note' -d Replace/Remove\ last\ entry\'s\ note
|
|
203
242
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command note' -d Section
|
|
204
243
|
complete -c doing -l search -f -r -n '__fish_doing_using_command note' -d Add/remove\ note\ from\ last\ entry\ matching\ search\ filter
|
|
205
244
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command note' -d Add/remove\ note\ from\ last\ entry\ matching\ tag
|
|
245
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command note' -d Force\ exact\ search\ string\ matching
|
|
206
246
|
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command now next' -d Backdate\ start\ time\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
|
207
247
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command now next' -d Edit\ entry\ with\ vim
|
|
208
248
|
complete -c doing -l finish_last -s f -f -n '__fish_doing_using_command now next' -d Timed\ entry
|
|
@@ -223,21 +263,30 @@ complete -c doing -l times -s t -f -n '__fish_doing_using_command recent' -d Sh
|
|
|
223
263
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command recent' -d Sort\ tags\ by
|
|
224
264
|
complete -c doing -l totals -f -n '__fish_doing_using_command recent' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
|
225
265
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command reset begin' -d Boolean
|
|
266
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command reset begin' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
267
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command reset begin' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
226
268
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command reset begin' -d Select\ from\ a\ menu\ of\ matching\ entries
|
|
269
|
+
complete -c doing -l not -f -n '__fish_doing_using_command reset begin' -d Reset\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
227
270
|
complete -c doing -l resume -s r -f -n '__fish_doing_using_command reset begin' -d Resume\ entry
|
|
228
|
-
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command reset begin' -d
|
|
271
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command reset begin' -d Limit\ search\ to\ section
|
|
229
272
|
complete -c doing -l search -f -r -n '__fish_doing_using_command reset begin' -d Reset\ last\ entry\ matching\ search\ filter
|
|
230
273
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command reset begin' -d Reset\ last\ entry\ matching\ tag
|
|
274
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command reset begin' -d Force\ exact\ search\ string\ matching
|
|
231
275
|
complete -c doing -l before -f -r -n '__fish_doing_using_command rotate' -d Rotate\ entries\ older\ than\ date
|
|
232
276
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command rotate' -d Tag\ boolean
|
|
277
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command rotate' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
278
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command rotate' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
233
279
|
complete -c doing -l keep -s k -f -r -n '__fish_doing_using_command rotate' -d How\ many\ items\ to\ keep\ in\ each\ section
|
|
280
|
+
complete -c doing -l not -f -n '__fish_doing_using_command rotate' -d Rotate\ items\ that\ \*don\'t\*\ match\ search\ string\ or\ tag\ filter
|
|
234
281
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command rotate' -d Section\ to\ rotate
|
|
235
282
|
complete -c doing -l search -f -r -n '__fish_doing_using_command rotate' -d Search\ filter
|
|
236
283
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command rotate' -d Tag\ filter
|
|
284
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command rotate' -d Force\ exact\ search\ string\ matching
|
|
237
285
|
complete -c doing -l column -s c -f -n '__fish_doing_using_command sections' -d List\ in\ single\ column
|
|
238
286
|
complete -c doing -l archive -s a -f -n '__fish_doing_using_command select' -d Archive\ selected\ items
|
|
239
287
|
complete -c doing -l resume -f -n '__fish_doing_using_command select' -d Copy\ selection\ as\ a\ new\ entry\ with\ current\ time\ and\ no\ @done\ tag
|
|
240
288
|
complete -c doing -l cancel -s c -f -n '__fish_doing_using_command select' -d Cancel\ selected\ items
|
|
289
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command select' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
241
290
|
complete -c doing -l delete -s d -f -n '__fish_doing_using_command select' -d Delete\ selected\ items
|
|
242
291
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command select' -d Edit\ selected\ item\(s\)
|
|
243
292
|
complete -c doing -l finish -s f -f -n '__fish_doing_using_command select' -d Add\ @done\ with\ current\ time\ to\ selected\ item\(s\)
|
|
@@ -245,19 +294,24 @@ complete -c doing -l flag -f -n '__fish_doing_using_command select' -d Add\ fl
|
|
|
245
294
|
complete -c doing -l force -f -n '__fish_doing_using_command select' -d Perform\ action\ without\ confirmation
|
|
246
295
|
complete -c doing -l move -s m -f -r -n '__fish_doing_using_command select' -d Move\ selected\ items\ to\ section
|
|
247
296
|
complete -c doing -l menu -f -n '__fish_doing_using_command select' -d Use\ --no-menu\ to\ skip\ the\ interactive\ menu
|
|
297
|
+
complete -c doing -l not -f -n '__fish_doing_using_command select' -d Select\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
248
298
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command select' -d Output\ entries\ to\ format
|
|
249
299
|
complete -c doing -l search -f -r -n '__fish_doing_using_command select' -d Initial\ search\ query\ for\ filtering
|
|
250
300
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command select' -d Reverse\ -c
|
|
251
301
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command select' -d Select\ from\ a\ specific\ section
|
|
252
302
|
complete -c doing -l save_to -f -r -n '__fish_doing_using_command select' -d Save\ selected\ entries\ to\ file\ using\ --output\ format
|
|
253
303
|
complete -c doing -l tag -s t -f -r -n '__fish_doing_using_command select' -d Tag\ selected\ entries
|
|
304
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command select' -d Force\ exact\ search\ string\ matching
|
|
254
305
|
complete -c doing -l age -s a -f -r -n '__fish_doing_using_command show' -d Age
|
|
255
306
|
complete -c doing -l after -f -r -n '__fish_doing_using_command show' -d View\ entries\ newer\ than\ date
|
|
256
307
|
complete -c doing -l bool -s b -f -r -n '__fish_doing_using_command show' -d Tag\ boolean
|
|
257
308
|
complete -c doing -l before -f -r -n '__fish_doing_using_command show' -d View\ entries\ older\ than\ date
|
|
258
309
|
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command show' -d Max\ count\ to\ show
|
|
310
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command show' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
259
311
|
complete -c doing -l from -s f -f -r -n '__fish_doing_using_command show' -d Date\ range\ to\ show
|
|
312
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command show' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
260
313
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command show' -d Select\ from\ a\ menu\ of\ matching\ entries\ to\ perform\ additional\ operations
|
|
314
|
+
complete -c doing -l not -f -n '__fish_doing_using_command show' -d Show\ items\ that\ \*don\'t\*\ match\ search/tag/date\ filters
|
|
261
315
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command show' -d Output\ to\ export\ format
|
|
262
316
|
complete -c doing -l only_timed -f -n '__fish_doing_using_command show' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
|
263
317
|
complete -c doing -l sort -s s -f -r -n '__fish_doing_using_command show' -d Sort\ order
|
|
@@ -267,6 +321,7 @@ complete -c doing -l tag -f -r -n '__fish_doing_using_command show' -d Tag\ fil
|
|
|
267
321
|
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command show' -d Tag\ sort\ direction
|
|
268
322
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command show' -d Sort\ tags\ by
|
|
269
323
|
complete -c doing -l totals -f -n '__fish_doing_using_command show' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
|
324
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command show' -d Force\ exact\ search\ string\ matching
|
|
270
325
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command since' -d Output\ to\ export\ format
|
|
271
326
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command since' -d Section
|
|
272
327
|
complete -c doing -l times -s t -f -n '__fish_doing_using_command since' -d Show\ time\ intervals\ on\ @done\ tasks
|
|
@@ -275,9 +330,12 @@ complete -c doing -l totals -f -n '__fish_doing_using_command since' -d Show\
|
|
|
275
330
|
complete -c doing -l autotag -s a -f -n '__fish_doing_using_command tag' -d Autotag\ entries\ based\ on\ autotag\ configuration\ in\ \~/
|
|
276
331
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command tag' -d Boolean
|
|
277
332
|
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command tag' -d How\ many\ recent\ entries\ to\ tag
|
|
333
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command tag' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
278
334
|
complete -c doing -l date -s d -f -n '__fish_doing_using_command tag' -d Include\ current\ date/time\ with\ tag
|
|
279
335
|
complete -c doing -l force -f -n '__fish_doing_using_command tag' -d Don\'t\ ask\ permission\ to\ tag\ all\ entries\ when\ count\ is\ 0
|
|
336
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command tag' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
280
337
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command tag' -d Select\ item\(s\)\ to\ tag\ from\ a\ menu\ of\ matching\ entries
|
|
338
|
+
complete -c doing -l not -f -n '__fish_doing_using_command tag' -d Tag\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
281
339
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command tag' -d Remove\ given\ tag\(s\)
|
|
282
340
|
complete -c doing -l regex -f -n '__fish_doing_using_command tag' -d Interpret\ tag\ string\ as\ regular\ expression
|
|
283
341
|
complete -c doing -l rename -f -r -n '__fish_doing_using_command tag' -d Replace\ existing\ tag\ with\ tag\ argument
|
|
@@ -285,6 +343,7 @@ complete -c doing -l section -s s -f -r -n '__fish_doing_using_command tag' -d S
|
|
|
285
343
|
complete -c doing -l search -f -r -n '__fish_doing_using_command tag' -d Tag\ entries\ matching\ search\ filter
|
|
286
344
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command tag' -d Tag\ the\ last\ X\ entries\ containing\ TAG
|
|
287
345
|
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command tag' -d Tag\ last\ entry
|
|
346
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command tag' -d Force\ exact\ search\ string\ matching
|
|
288
347
|
complete -c doing -l list -s l -f -n '__fish_doing_using_command template' -d List\ all\ available\ templates
|
|
289
348
|
complete -c doing -l after -f -r -n '__fish_doing_using_command today' -d View\ entries\ after\ specified\ time
|
|
290
349
|
complete -c doing -l before -f -r -n '__fish_doing_using_command today' -d View\ entries\ before\ specified\ time
|
|
@@ -298,8 +357,11 @@ complete -c doing -l after -f -r -n '__fish_doing_using_command view' -d View\
|
|
|
298
357
|
complete -c doing -l bool -s b -f -r -n '__fish_doing_using_command view' -d Tag\ boolean
|
|
299
358
|
complete -c doing -l before -f -r -n '__fish_doing_using_command view' -d View\ entries\ older\ than\ date
|
|
300
359
|
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command view' -d Count\ to\ display
|
|
360
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command view' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
301
361
|
complete -c doing -l color -f -n '__fish_doing_using_command view' -d Include\ colors\ in\ output
|
|
362
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command view' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
302
363
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command view' -d Select\ from\ a\ menu\ of\ matching\ entries\ to\ perform\ additional\ operations
|
|
364
|
+
complete -c doing -l not -f -n '__fish_doing_using_command view' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string
|
|
303
365
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command view' -d Output\ to\ export\ format
|
|
304
366
|
complete -c doing -l only_timed -f -n '__fish_doing_using_command view' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
|
305
367
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command view' -d Section
|
|
@@ -309,6 +371,7 @@ complete -c doing -l tag -f -r -n '__fish_doing_using_command view' -d Tag\ fil
|
|
|
309
371
|
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command view' -d Tag\ sort\ direction
|
|
310
372
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command view' -d Sort\ tags\ by
|
|
311
373
|
complete -c doing -l totals -f -n '__fish_doing_using_command view' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
|
374
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command view' -d Force\ exact\ search\ string\ matching
|
|
312
375
|
complete -c doing -l column -s c -f -n '__fish_doing_using_command views' -d List\ in\ single\ column
|
|
313
376
|
complete -c doing -l after -f -r -n '__fish_doing_using_command wiki' -d Include\ entries\ newer\ than\ date
|
|
314
377
|
complete -c doing -l bool -s b -f -r -n '__fish_doing_using_command wiki' -d Tag\ boolean
|
data/lib/doing/item.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Doing
|
|
|
5
5
|
## This class describes a single WWID item
|
|
6
6
|
##
|
|
7
7
|
class Item
|
|
8
|
-
include Amatch
|
|
8
|
+
# include Amatch
|
|
9
9
|
|
|
10
10
|
attr_accessor :date, :title, :section, :note
|
|
11
11
|
|
|
@@ -161,22 +161,23 @@ module Doing
|
|
|
161
161
|
##
|
|
162
162
|
def search(search, distance: 3, negate: false, case_type: :smart, fuzzy: false)
|
|
163
163
|
text = @title + @note.to_s
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
end
|
|
164
|
+
matches = text =~ search.to_rx(distance: distance, case_type: case_type)
|
|
165
|
+
|
|
166
|
+
# if search.is_rx? || !fuzzy
|
|
167
|
+
# matches = text =~ search.to_rx(distance: distance, case_type: case_type)
|
|
168
|
+
# else
|
|
169
|
+
# distance = 0.25 if distance > 1
|
|
170
|
+
# score = if (case_type == :smart && search !~ /[A-Z]/) || case_type == :ignore
|
|
171
|
+
# text.downcase.pair_distance_similar(search.downcase)
|
|
172
|
+
# else
|
|
173
|
+
# score = text.pair_distance_similar(search)
|
|
174
|
+
# end
|
|
175
|
+
|
|
176
|
+
# if score >= distance
|
|
177
|
+
# matches = true
|
|
178
|
+
# Doing.logger.debug('Fuzzy Match:', %(#{@title}, "#{search}" #{score}))
|
|
179
|
+
# end
|
|
180
|
+
# end
|
|
180
181
|
|
|
181
182
|
negate ? !matches : matches
|
|
182
183
|
end
|
|
@@ -69,22 +69,28 @@ module Doing
|
|
|
69
69
|
|
|
70
70
|
output.sub!(/%section/, item.section) if item.section
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
output.
|
|
72
|
+
title_rx = /(?mi)%(?<width>-?\d+)?(?:(?<ichar>[ _t])(?<icount>\d+))?(?<prefix>.[ _t]?)?title(?<after>.*?)$/
|
|
73
|
+
title_color = Doing::Color.reset + output.match(/(?mi)^(.*?)(%.*?title)/)[1].last_color
|
|
74
|
+
|
|
75
|
+
title_offset = Doing::Color.uncolor(output).match(title_rx).begin(0)
|
|
76
|
+
|
|
77
|
+
output.sub!(title_rx) do
|
|
74
78
|
m = Regexp.last_match
|
|
75
|
-
|
|
79
|
+
|
|
80
|
+
after = m['after']
|
|
81
|
+
pad = m['width'].to_i
|
|
76
82
|
indent = ''
|
|
77
|
-
if m[
|
|
78
|
-
char = m[
|
|
79
|
-
indent = char * m[
|
|
83
|
+
if m['ichar']
|
|
84
|
+
char = m['ichar'] =~ /t/ ? "\t" : ' '
|
|
85
|
+
indent = char * m['icount'].to_i
|
|
80
86
|
end
|
|
81
|
-
|
|
87
|
+
prefix = m['prefix']
|
|
82
88
|
if opt[:wrap_width]&.positive? || pad.positive?
|
|
83
89
|
width = pad.positive? ? pad : opt[:wrap_width]
|
|
84
|
-
item.title.wrap(width, pad: pad, indent: indent, offset: title_offset, prefix:
|
|
90
|
+
item.title.wrap(width, pad: pad, indent: indent, offset: title_offset, prefix: prefix, color: title_color, after: after, reset: reset)
|
|
85
91
|
# flag + item.title.gsub(/(.{#{opt[:wrap_width]}})(?=\s+|\Z)/, "\\1\n ").sub(/\s*$/, '') + reset
|
|
86
92
|
else
|
|
87
|
-
format("%s%#{pad}s%s%s",
|
|
93
|
+
format("%s%s%#{pad}s%s%s", title_color, prefix, item.title.sub(/\s*$/, ''), reset, after)
|
|
88
94
|
end
|
|
89
95
|
end
|
|
90
96
|
|
data/lib/doing/string.rb
CHANGED
|
@@ -77,13 +77,15 @@ module Doing
|
|
|
77
77
|
##
|
|
78
78
|
def highlight_tags(color = 'yellow')
|
|
79
79
|
escapes = scan(/(\e\[[\d;]+m)[^\e]+@/)
|
|
80
|
-
|
|
80
|
+
color = color.split(' ') unless color.is_a?(Array)
|
|
81
|
+
tag_color = ''
|
|
82
|
+
color.each { |c| tag_color += Doing::Color.send(c) }
|
|
81
83
|
last_color = if !escapes.empty?
|
|
82
84
|
escapes[-1][0]
|
|
83
85
|
else
|
|
84
86
|
Doing::Color.default
|
|
85
87
|
end
|
|
86
|
-
gsub(/(\s|m)(@[^ ("']+)/, "\\1#{tag_color}\\2#{last_color}")
|
|
88
|
+
gsub(/(\s|m)(@[^ ("']+)/, "\\1#{tag_color}\\2#{Doing::Color.reset}#{last_color}")
|
|
87
89
|
end
|
|
88
90
|
|
|
89
91
|
##
|
|
@@ -159,19 +161,21 @@ module Doing
|
|
|
159
161
|
## @param offset [Integer] (Optional) The width to pad each subsequent line
|
|
160
162
|
## @param prefix [String] (Optional) A prefix to add to each line
|
|
161
163
|
##
|
|
162
|
-
def wrap(len, pad: 0, indent: ' ', offset: 0, prefix: '', after: '', reset: '')
|
|
164
|
+
def wrap(len, pad: 0, indent: ' ', offset: 0, prefix: '', color: '', after: '', reset: '')
|
|
165
|
+
last_color = after.last_color
|
|
163
166
|
note_rx = /(?i-m)(%(?:[io]d|(?:\^[\s\S])?(?:(?:[ _t]|[^a-z0-9])?\d+)?(?:[\s\S][ _t]?)?)?note)/
|
|
164
|
-
|
|
167
|
+
# Don't break inside of tag values
|
|
168
|
+
str = gsub(/@\S+\(.*?\)/) { |tag| tag.gsub(/\s/, '%%%%') }
|
|
165
169
|
words = str.split(/ /).map { |word| word.gsub(/%%%%/, ' ') }
|
|
166
170
|
out = []
|
|
167
171
|
line = []
|
|
168
172
|
words.each do |word|
|
|
169
|
-
if line.join(' ').length + word.length + 1 > len
|
|
173
|
+
if line.join(' ').uncolor.length + word.uncolor.length + 1 > len
|
|
170
174
|
out.push(line.join(' '))
|
|
171
175
|
line.clear
|
|
172
176
|
end
|
|
173
177
|
|
|
174
|
-
line << word
|
|
178
|
+
line << word.uncolor
|
|
175
179
|
end
|
|
176
180
|
out.push(line.join(' '))
|
|
177
181
|
note = ''
|
|
@@ -180,10 +184,11 @@ module Doing
|
|
|
180
184
|
''
|
|
181
185
|
end
|
|
182
186
|
|
|
183
|
-
out[0] = format("%-#{pad}s%s", out[0], after)
|
|
184
|
-
|
|
187
|
+
out[0] = format("%-#{pad}s%s%s", out[0], last_color, after)
|
|
188
|
+
|
|
189
|
+
left_pad = ' ' * offset
|
|
185
190
|
left_pad += indent
|
|
186
|
-
out.map { |l| "#{left_pad}#{
|
|
191
|
+
out.map { |l| "#{left_pad}#{color}#{l}#{last_color}" }.join("\n").strip + last_color + " #{note}".chomp
|
|
187
192
|
end
|
|
188
193
|
|
|
189
194
|
##
|
|
@@ -368,6 +373,14 @@ module Doing
|
|
|
368
373
|
title
|
|
369
374
|
end
|
|
370
375
|
|
|
376
|
+
# Returns the last escape sequence from a string
|
|
377
|
+
#
|
|
378
|
+
# @param string The string to examine
|
|
379
|
+
#
|
|
380
|
+
def last_color
|
|
381
|
+
scan(/\e\[[\d;]+m/).join('')
|
|
382
|
+
end
|
|
383
|
+
|
|
371
384
|
##
|
|
372
385
|
## Turn raw urls into HTML links
|
|
373
386
|
##
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
|
@@ -1637,13 +1637,20 @@ module Doing
|
|
|
1637
1637
|
## @param opt [Hash] Additional Options
|
|
1638
1638
|
##
|
|
1639
1639
|
def list_section(opt = {})
|
|
1640
|
+
opt[:config_template] ||= 'default'
|
|
1641
|
+
cfg = @config.dig('templates', opt[:config_template]).deep_merge({
|
|
1642
|
+
'wrap_width' => @config['wrap_width'] || 0,
|
|
1643
|
+
'date_format' => @config['default_date_format'],
|
|
1644
|
+
'order' => @config['order'] || 'asc',
|
|
1645
|
+
'tags_color' => @config['tags_color']
|
|
1646
|
+
})
|
|
1640
1647
|
opt[:count] ||= 0
|
|
1641
1648
|
opt[:age] ||= 'newest'
|
|
1642
|
-
opt[:format] ||=
|
|
1643
|
-
opt[:order] ||=
|
|
1649
|
+
opt[:format] ||= cfg['date_format']
|
|
1650
|
+
opt[:order] ||= cfg['order'] || 'asc'
|
|
1644
1651
|
opt[:tag_order] ||= 'asc'
|
|
1645
|
-
opt[:tags_color] ||= false
|
|
1646
|
-
opt[:template] ||=
|
|
1652
|
+
opt[:tags_color] ||= cfg['tags_color'] || false
|
|
1653
|
+
opt[:template] ||= cfg['template']
|
|
1647
1654
|
|
|
1648
1655
|
# opt[:highlight] ||= true
|
|
1649
1656
|
title = ''
|
|
@@ -1684,7 +1691,7 @@ module Doing
|
|
|
1684
1691
|
|
|
1685
1692
|
opt[:output] ||= 'template'
|
|
1686
1693
|
|
|
1687
|
-
opt[:wrap_width] ||= @config['templates']['default']['wrap_width']
|
|
1694
|
+
opt[:wrap_width] ||= @config['templates']['default']['wrap_width'] || 0
|
|
1688
1695
|
|
|
1689
1696
|
output(items, title, is_single, opt)
|
|
1690
1697
|
end
|
|
@@ -1729,13 +1736,18 @@ module Doing
|
|
|
1729
1736
|
opt[:totals] ||= false
|
|
1730
1737
|
opt[:sort_tags] ||= false
|
|
1731
1738
|
|
|
1732
|
-
cfg = @config['templates']['today']
|
|
1739
|
+
cfg = @config['templates']['today'].deep_merge(@config['templates']['default']).deep_merge({
|
|
1740
|
+
'wrap_width' => @config['wrap_width'] || 0,
|
|
1741
|
+
'date_format' => @config['default_date_format'],
|
|
1742
|
+
'order' => @config['order'] || 'asc',
|
|
1743
|
+
'tags_color' => @config['tags_color']
|
|
1744
|
+
})
|
|
1733
1745
|
options = {
|
|
1734
1746
|
after: opt[:after],
|
|
1735
1747
|
before: opt[:before],
|
|
1736
1748
|
count: 0,
|
|
1737
1749
|
format: cfg['date_format'],
|
|
1738
|
-
order: 'asc',
|
|
1750
|
+
order: cfg['order'] || 'asc',
|
|
1739
1751
|
output: output,
|
|
1740
1752
|
section: opt[:section],
|
|
1741
1753
|
sort_tags: opt[:sort_tags],
|
|
@@ -1743,7 +1755,9 @@ module Doing
|
|
|
1743
1755
|
times: times,
|
|
1744
1756
|
today: true,
|
|
1745
1757
|
totals: opt[:totals],
|
|
1746
|
-
wrap_width: cfg['wrap_width']
|
|
1758
|
+
wrap_width: cfg['wrap_width'],
|
|
1759
|
+
tags_color: cfg['tags_color'],
|
|
1760
|
+
config_template: 'today'
|
|
1747
1761
|
}
|
|
1748
1762
|
list_section(options)
|
|
1749
1763
|
end
|
|
@@ -1765,7 +1779,7 @@ module Doing
|
|
|
1765
1779
|
dates = [dates, dates] if dates.instance_of?(String)
|
|
1766
1780
|
|
|
1767
1781
|
list_section({ section: section, count: 0, order: 'asc', date_filter: dates, times: times,
|
|
1768
|
-
output: output, totals: opt[:totals], sort_tags: opt[:sort_tags] })
|
|
1782
|
+
output: output, totals: opt[:totals], sort_tags: opt[:sort_tags], config_template: 'default' })
|
|
1769
1783
|
end
|
|
1770
1784
|
|
|
1771
1785
|
##
|
|
@@ -1795,7 +1809,8 @@ module Doing
|
|
|
1795
1809
|
tag_order: opt[:tag_order],
|
|
1796
1810
|
times: times,
|
|
1797
1811
|
totals: opt[:totals],
|
|
1798
|
-
yesterday: true
|
|
1812
|
+
yesterday: true,
|
|
1813
|
+
config_template: 'today'
|
|
1799
1814
|
}
|
|
1800
1815
|
|
|
1801
1816
|
list_section(options)
|
|
@@ -1813,14 +1828,19 @@ module Doing
|
|
|
1813
1828
|
opt[:totals] ||= false
|
|
1814
1829
|
opt[:sort_tags] ||= false
|
|
1815
1830
|
|
|
1816
|
-
cfg = @config['templates']['recent']
|
|
1831
|
+
cfg = @config['templates']['recent'].deep_merge(@config['templates']['default']).deep_merge({
|
|
1832
|
+
'wrap_width' => @config['wrap_width'] || 0,
|
|
1833
|
+
'date_format' => @config['default_date_format'],
|
|
1834
|
+
'order' => @config['order'] || 'asc',
|
|
1835
|
+
'tags_color' => @config['tags_color']
|
|
1836
|
+
})
|
|
1817
1837
|
section ||= @config['current_section']
|
|
1818
1838
|
section = guess_section(section)
|
|
1819
1839
|
|
|
1820
1840
|
list_section({ section: section, wrap_width: cfg['wrap_width'], count: count,
|
|
1821
1841
|
format: cfg['date_format'], template: cfg['template'],
|
|
1822
1842
|
order: 'asc', times: times, totals: opt[:totals],
|
|
1823
|
-
sort_tags: opt[:sort_tags], tags_color: opt[:tags_color] })
|
|
1843
|
+
sort_tags: opt[:sort_tags], tags_color: opt[:tags_color], config_template: 'recent' })
|
|
1824
1844
|
end
|
|
1825
1845
|
|
|
1826
1846
|
##
|
|
@@ -1831,7 +1851,12 @@ module Doing
|
|
|
1831
1851
|
##
|
|
1832
1852
|
def last(times: true, section: nil, options: {})
|
|
1833
1853
|
section = section.nil? || section =~ /all/i ? 'All' : guess_section(section)
|
|
1834
|
-
cfg = @config['templates']['last']
|
|
1854
|
+
cfg = @config['templates']['last'].deep_merge(@config['templates']['default']).deep_merge({
|
|
1855
|
+
'wrap_width' => @config['wrap_width'] || 0,
|
|
1856
|
+
'date_format' => @config['default_date_format'],
|
|
1857
|
+
'order' => @config['order'] || 'asc',
|
|
1858
|
+
'tags_color' => @config['tags_color']
|
|
1859
|
+
})
|
|
1835
1860
|
|
|
1836
1861
|
opts = {
|
|
1837
1862
|
section: section,
|
|
@@ -1852,6 +1877,7 @@ module Doing
|
|
|
1852
1877
|
opts[:search] = options[:search] if options[:search]
|
|
1853
1878
|
opts[:case] = options[:case]
|
|
1854
1879
|
opts[:not] = options[:negate]
|
|
1880
|
+
opts[:config_template] = 'last'
|
|
1855
1881
|
list_section(opts)
|
|
1856
1882
|
end
|
|
1857
1883
|
|
data/lib/doing.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: doing
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Terpstra
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-11-
|
|
11
|
+
date: 2021-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: safe_yaml
|
|
@@ -128,6 +128,20 @@ dependencies:
|
|
|
128
128
|
- - ">="
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
130
|
version: '0'
|
|
131
|
+
- !ruby/object:Gem::Dependency
|
|
132
|
+
name: parallel_tests
|
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - ">="
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '0'
|
|
138
|
+
type: :development
|
|
139
|
+
prerelease: false
|
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
141
|
+
requirements:
|
|
142
|
+
- - ">="
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: '0'
|
|
131
145
|
- !ruby/object:Gem::Dependency
|
|
132
146
|
name: gli
|
|
133
147
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -208,26 +222,6 @@ dependencies:
|
|
|
208
222
|
- - ">="
|
|
209
223
|
- !ruby/object:Gem::Version
|
|
210
224
|
version: 1.2.1
|
|
211
|
-
- !ruby/object:Gem::Dependency
|
|
212
|
-
name: amatch
|
|
213
|
-
requirement: !ruby/object:Gem::Requirement
|
|
214
|
-
requirements:
|
|
215
|
-
- - "~>"
|
|
216
|
-
- !ruby/object:Gem::Version
|
|
217
|
-
version: '0.4'
|
|
218
|
-
- - ">="
|
|
219
|
-
- !ruby/object:Gem::Version
|
|
220
|
-
version: 0.4.0
|
|
221
|
-
type: :runtime
|
|
222
|
-
prerelease: false
|
|
223
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
224
|
-
requirements:
|
|
225
|
-
- - "~>"
|
|
226
|
-
- !ruby/object:Gem::Version
|
|
227
|
-
version: '0.4'
|
|
228
|
-
- - ">="
|
|
229
|
-
- !ruby/object:Gem::Version
|
|
230
|
-
version: 0.4.0
|
|
231
225
|
description: A tool for managing a TaskPaper-like file of recent activites. Perfect
|
|
232
226
|
for the late-night hacker on too much caffeine to remember what they accomplished
|
|
233
227
|
at 2 in the morning.
|