doing 2.0.9.pre → 2.0.15
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/.yardoc/checksums +20 -0
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +21 -1
- data/Gemfile.lock +20 -10
- data/README.md +1 -1
- data/Rakefile +10 -1
- data/bin/doing +106 -38
- data/doc/Array.html +135 -0
- data/doc/Doing/Color.html +506 -0
- data/doc/Doing/Configuration.html +680 -0
- data/doc/Doing/Errors/DoingNoTraceError.html +186 -0
- data/doc/Doing/Errors/DoingRuntimeError.html +186 -0
- data/doc/Doing/Errors/DoingStandardError.html +186 -0
- data/doc/Doing/Errors/EmptyInput.html +186 -0
- data/doc/Doing/Errors/NoResults.html +186 -0
- data/doc/Doing/Errors/PluginException.html +248 -0
- data/doc/Doing/Errors/UserCancelled.html +186 -0
- data/doc/Doing/Errors/WrongCommand.html +186 -0
- data/doc/Doing/Errors.html +191 -0
- data/doc/Doing/Hooks.html +364 -0
- data/doc/Doing/Item.html +1385 -0
- data/doc/Doing/Items.html +393 -0
- data/doc/Doing/LogAdapter.html +1650 -0
- data/doc/Doing/Note.html +535 -0
- data/doc/Doing/Pager.html +268 -0
- data/doc/Doing/Plugins.html +849 -0
- data/doc/Doing/Util.html +870 -0
- data/doc/Doing/WWID.html +4827 -0
- data/doc/Doing.html +145 -0
- data/doc/GLI/Commands/MarkdownDocumentListener.html +763 -0
- data/doc/GLI/Commands.html +115 -0
- data/doc/GLI.html +115 -0
- data/doc/Hash.html +332 -0
- data/doc/Status.html +292 -0
- data/doc/String.html +1714 -0
- data/doc/Symbol.html +250 -0
- data/doc/Time.html +182 -0
- data/doc/_index.html +411 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +123 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +123 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1867 -0
- data/doc/top-level-namespace.html +112 -0
- data/doing.gemspec +6 -1
- data/doing.rdoc +16 -16
- data/example_plugin.rb +6 -6
- data/lib/completion/_doing.zsh +24 -20
- data/lib/completion/doing.bash +41 -30
- data/lib/completion/doing.fish +50 -1
- data/lib/doing/array.rb +15 -2
- data/lib/doing/configuration.rb +14 -12
- data/lib/doing/hash.rb +1 -1
- data/lib/doing/item.rb +104 -19
- data/lib/doing/log_adapter.rb +132 -119
- data/lib/doing/note.rb +1 -1
- data/lib/doing/plugin_manager.rb +5 -5
- data/lib/doing/plugins/export/csv_export.rb +1 -1
- data/lib/doing/plugins/export/template_export.rb +5 -7
- data/lib/doing/plugins/import/calendar_import.rb +1 -1
- data/lib/doing/plugins/import/doing_import.rb +4 -4
- data/lib/doing/plugins/import/timing_import.rb +5 -3
- data/lib/doing/string.rb +77 -24
- data/lib/doing/symbol.rb +9 -5
- data/lib/doing/time.rb +1 -1
- data/lib/doing/util.rb +18 -11
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +513 -372
- data/lib/doing/wwidfile.rb +5 -5
- data/lib/doing.rb +2 -1
- data/lib/examples/plugins/say_export.rb +6 -6
- data/rdocfixer.rb +1 -1
- data/yard_templates/default/method_details/setup.rb +3 -0
- metadata +111 -4
data/bin/doing
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
$LOAD_PATH.unshift File.join(__dir__, '..', 'lib')
|
|
@@ -198,13 +198,16 @@ command %i[reset begin] do |c|
|
|
|
198
198
|
c.arg_name 'QUERY'
|
|
199
199
|
c.flag [:search]
|
|
200
200
|
|
|
201
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
202
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
203
|
+
|
|
201
204
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
202
205
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
203
206
|
|
|
204
207
|
c.desc 'Reset items that *don\'t* match search/tag filters'
|
|
205
208
|
c.switch [:not], default_value: false, negatable: false
|
|
206
209
|
|
|
207
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
210
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
208
211
|
c.arg_name 'TYPE'
|
|
209
212
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
210
213
|
|
|
@@ -216,6 +219,7 @@ command %i[reset begin] do |c|
|
|
|
216
219
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
217
220
|
|
|
218
221
|
c.action do |global_options, options, args|
|
|
222
|
+
options[:fuzzy] = false
|
|
219
223
|
if options[:section]
|
|
220
224
|
options[:section] = wwid.guess_section(options[:section]) || options[:section].cap_first
|
|
221
225
|
end
|
|
@@ -293,13 +297,16 @@ command :note do |c|
|
|
|
293
297
|
c.arg_name 'QUERY'
|
|
294
298
|
c.flag [:search]
|
|
295
299
|
|
|
300
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
301
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
302
|
+
|
|
296
303
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
297
304
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
298
305
|
|
|
299
306
|
c.desc 'Add note to item that *doesn\'t* match search/tag filters'
|
|
300
307
|
c.switch [:not], default_value: false, negatable: false
|
|
301
308
|
|
|
302
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
309
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
303
310
|
c.arg_name 'TYPE'
|
|
304
311
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
305
312
|
|
|
@@ -311,6 +318,7 @@ command :note do |c|
|
|
|
311
318
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
312
319
|
|
|
313
320
|
c.action do |_global_options, options, args|
|
|
321
|
+
options[:fuzzy] = false
|
|
314
322
|
if options[:section]
|
|
315
323
|
options[:section] = wwid.guess_section(options[:section]) || options[:section].cap_first
|
|
316
324
|
end
|
|
@@ -530,7 +538,7 @@ command :select do |c|
|
|
|
530
538
|
c.desc 'Select items that *don\'t* match search/tag filters'
|
|
531
539
|
c.switch [:not], default_value: false, negatable: false
|
|
532
540
|
|
|
533
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
541
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
534
542
|
c.arg_name 'TYPE'
|
|
535
543
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
536
544
|
|
|
@@ -848,13 +856,16 @@ command :cancel do |c|
|
|
|
848
856
|
c.arg_name 'QUERY'
|
|
849
857
|
c.flag [:search]
|
|
850
858
|
|
|
859
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
860
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
861
|
+
|
|
851
862
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
852
863
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
853
864
|
|
|
854
865
|
c.desc 'Finish items that *don\'t* match search/tag filters'
|
|
855
866
|
c.switch [:not], default_value: false, negatable: false
|
|
856
867
|
|
|
857
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
868
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
858
869
|
c.arg_name 'TYPE'
|
|
859
870
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
860
871
|
|
|
@@ -865,6 +876,7 @@ command :cancel do |c|
|
|
|
865
876
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
866
877
|
|
|
867
878
|
c.action do |_global_options, options, args|
|
|
879
|
+
options[:fuzzy] = false
|
|
868
880
|
if options[:section]
|
|
869
881
|
section = wwid.guess_section(options[:section]) || options[:section].cap_first
|
|
870
882
|
else
|
|
@@ -895,19 +907,20 @@ command :cancel do |c|
|
|
|
895
907
|
end
|
|
896
908
|
|
|
897
909
|
opts = {
|
|
898
|
-
search: search,
|
|
899
|
-
case: options[:case].normalize_case,
|
|
900
|
-
not: options[:not],
|
|
901
910
|
archive: options[:a],
|
|
911
|
+
case: options[:case].normalize_case,
|
|
902
912
|
count: count,
|
|
903
913
|
date: false,
|
|
914
|
+
fuzzy: options[:fuzzy],
|
|
915
|
+
interactive: options[:interactive],
|
|
916
|
+
not: options[:not],
|
|
917
|
+
search: search,
|
|
904
918
|
section: section,
|
|
905
919
|
sequential: false,
|
|
906
920
|
tag: tags,
|
|
907
921
|
tag_bool: options[:bool].normalize_bool,
|
|
908
922
|
tags: ['done'],
|
|
909
|
-
unfinished: options[:unfinished]
|
|
910
|
-
interactive: options[:interactive]
|
|
923
|
+
unfinished: options[:unfinished]
|
|
911
924
|
}
|
|
912
925
|
|
|
913
926
|
wwid.tag_last(opts)
|
|
@@ -946,13 +959,16 @@ command :finish do |c|
|
|
|
946
959
|
c.arg_name 'QUERY'
|
|
947
960
|
c.flag [:search]
|
|
948
961
|
|
|
962
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
963
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
964
|
+
|
|
949
965
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
950
966
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
951
967
|
|
|
952
968
|
c.desc 'Finish items that *don\'t* match search/tag filters'
|
|
953
969
|
c.switch [:not], default_value: false, negatable: false
|
|
954
970
|
|
|
955
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
971
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
956
972
|
c.arg_name 'TYPE'
|
|
957
973
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
958
974
|
|
|
@@ -982,6 +998,7 @@ command :finish do |c|
|
|
|
982
998
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
983
999
|
|
|
984
1000
|
c.action do |_global_options, options, args|
|
|
1001
|
+
options[:fuzzy] = false
|
|
985
1002
|
unless options[:auto]
|
|
986
1003
|
if options[:took]
|
|
987
1004
|
took = wwid.chronify_qty(options[:took])
|
|
@@ -1034,19 +1051,20 @@ command :finish do |c|
|
|
|
1034
1051
|
opts = {
|
|
1035
1052
|
archive: options[:archive],
|
|
1036
1053
|
back: date,
|
|
1054
|
+
case: options[:case].normalize_case,
|
|
1037
1055
|
count: count,
|
|
1038
1056
|
date: options[:date],
|
|
1039
|
-
|
|
1040
|
-
|
|
1057
|
+
fuzzy: options[:fuzzy],
|
|
1058
|
+
interactive: options[:interactive],
|
|
1041
1059
|
not: options[:not],
|
|
1060
|
+
remove: options[:remove],
|
|
1061
|
+
search: search,
|
|
1042
1062
|
section: options[:section],
|
|
1043
1063
|
sequential: options[:auto],
|
|
1044
1064
|
tag: tags,
|
|
1045
1065
|
tag_bool: options[:bool].normalize_bool,
|
|
1046
1066
|
tags: ['done'],
|
|
1047
|
-
unfinished: options[:unfinished]
|
|
1048
|
-
remove: options[:remove],
|
|
1049
|
-
interactive: options[:interactive]
|
|
1067
|
+
unfinished: options[:unfinished]
|
|
1050
1068
|
}
|
|
1051
1069
|
|
|
1052
1070
|
wwid.tag_last(opts)
|
|
@@ -1072,13 +1090,16 @@ command %i[again resume] do |c|
|
|
|
1072
1090
|
c.arg_name 'QUERY'
|
|
1073
1091
|
c.flag [:search]
|
|
1074
1092
|
|
|
1093
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
1094
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
1095
|
+
|
|
1075
1096
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
1076
1097
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
1077
1098
|
|
|
1078
1099
|
c.desc 'Resume items that *don\'t* match search/tag filters'
|
|
1079
1100
|
c.switch [:not], default_value: false, negatable: false
|
|
1080
1101
|
|
|
1081
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
1102
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
1082
1103
|
c.arg_name 'TYPE'
|
|
1083
1104
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
1084
1105
|
|
|
@@ -1097,6 +1118,7 @@ command %i[again resume] do |c|
|
|
|
1097
1118
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
1098
1119
|
|
|
1099
1120
|
c.action do |_global_options, options, _args|
|
|
1121
|
+
options[:fuzzy] = false
|
|
1100
1122
|
tags = options[:tag].nil? ? [] : options[:tag].to_tags
|
|
1101
1123
|
|
|
1102
1124
|
options[:case] = options[:case].normalize_case
|
|
@@ -1107,7 +1129,7 @@ command %i[again resume] do |c|
|
|
|
1107
1129
|
options[:search] = search
|
|
1108
1130
|
end
|
|
1109
1131
|
|
|
1110
|
-
opts = options
|
|
1132
|
+
opts = options.dup
|
|
1111
1133
|
|
|
1112
1134
|
opts[:tag] = tags
|
|
1113
1135
|
opts[:tag_bool] = options[:bool].normalize_bool
|
|
@@ -1178,13 +1200,16 @@ command :tag do |c|
|
|
|
1178
1200
|
c.arg_name 'QUERY'
|
|
1179
1201
|
c.flag [:search]
|
|
1180
1202
|
|
|
1203
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
1204
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
1205
|
+
|
|
1181
1206
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
1182
1207
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
1183
1208
|
|
|
1184
1209
|
c.desc 'Tag items that *don\'t* match search/tag filters'
|
|
1185
1210
|
c.switch [:not], default_value: false, negatable: false
|
|
1186
1211
|
|
|
1187
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
1212
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
1188
1213
|
c.arg_name 'TYPE'
|
|
1189
1214
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
1190
1215
|
|
|
@@ -1196,6 +1221,7 @@ command :tag do |c|
|
|
|
1196
1221
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
1197
1222
|
|
|
1198
1223
|
c.action do |_global_options, options, args|
|
|
1224
|
+
options[:fuzzy] = false
|
|
1199
1225
|
raise MissingArgument, 'You must specify at least one tag' if args.empty? && !options[:autotag]
|
|
1200
1226
|
|
|
1201
1227
|
raise InvalidArgument, '--search and --tag can not be used together' if options[:search] && options[:tag]
|
|
@@ -1232,6 +1258,7 @@ command :tag do |c|
|
|
|
1232
1258
|
count = options[:count].to_i
|
|
1233
1259
|
end
|
|
1234
1260
|
|
|
1261
|
+
options[:case] ||= :smart
|
|
1235
1262
|
options[:case] = options[:case].normalize_case
|
|
1236
1263
|
|
|
1237
1264
|
if options[:search]
|
|
@@ -1310,13 +1337,16 @@ command [:mark, :flag] do |c|
|
|
|
1310
1337
|
c.arg_name 'QUERY'
|
|
1311
1338
|
c.flag [:search]
|
|
1312
1339
|
|
|
1340
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
1341
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
1342
|
+
|
|
1313
1343
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
1314
1344
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
1315
1345
|
|
|
1316
1346
|
c.desc 'Flag items that *don\'t* match search/tag/date filters'
|
|
1317
1347
|
c.switch [:not], default_value: false, negatable: false
|
|
1318
1348
|
|
|
1319
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
1349
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
1320
1350
|
c.arg_name 'TYPE'
|
|
1321
1351
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
1322
1352
|
|
|
@@ -1328,6 +1358,7 @@ command [:mark, :flag] do |c|
|
|
|
1328
1358
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
1329
1359
|
|
|
1330
1360
|
c.action do |_global_options, options, _args|
|
|
1361
|
+
options[:fuzzy] = false
|
|
1331
1362
|
mark = settings['marker_tag'] || 'flagged'
|
|
1332
1363
|
|
|
1333
1364
|
raise InvalidArgument, '--search and --tag can not be used together' if options[:search] && options[:tag]
|
|
@@ -1402,7 +1433,9 @@ command :show do |c|
|
|
|
1402
1433
|
c.example 'doing show Currently', desc: 'Show entries in the Currently section'
|
|
1403
1434
|
c.example 'doing show @project1', desc: 'Show entries tagged @project1'
|
|
1404
1435
|
c.example 'doing show Later @doing', desc: 'Show entries from the Later section tagged @doing'
|
|
1405
|
-
c.example 'doing show
|
|
1436
|
+
c.example 'doing show @oracle @writing --bool and', desc: 'Show entries tagged both @oracle and @writing'
|
|
1437
|
+
c.example 'doing show Currently @devo --bool not', desc: 'Show entries in Currently NOT tagged @devo'
|
|
1438
|
+
c.example 'doing show Ideas @doing --from "mon to fri"', desc: 'Show entries tagged @doing from the Ideas section added between monday and friday of the current week.'
|
|
1406
1439
|
c.example 'doing show --interactive Later @doing', desc: 'Create a menu from entries from the Later section tagged @doing to perform batch actions'
|
|
1407
1440
|
|
|
1408
1441
|
c.desc 'Tag filter, combine multiple tags with a comma. Added for compatibility with other commands.'
|
|
@@ -1433,13 +1466,16 @@ command :show do |c|
|
|
|
1433
1466
|
c.arg_name 'QUERY'
|
|
1434
1467
|
c.flag [:search]
|
|
1435
1468
|
|
|
1469
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
1470
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
1471
|
+
|
|
1436
1472
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
1437
1473
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
1438
1474
|
|
|
1439
1475
|
c.desc 'Show items that *don\'t* match search/tag/date filters'
|
|
1440
1476
|
c.switch [:not], default_value: false, negatable: false
|
|
1441
1477
|
|
|
1442
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
1478
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
1443
1479
|
c.arg_name 'TYPE'
|
|
1444
1480
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
1445
1481
|
|
|
@@ -1481,6 +1517,7 @@ command :show do |c|
|
|
|
1481
1517
|
c.arg_name 'FORMAT'
|
|
1482
1518
|
c.flag %i[o output]
|
|
1483
1519
|
c.action do |global_options, options, args|
|
|
1520
|
+
options[:fuzzy] = false
|
|
1484
1521
|
raise DoingRuntimeError, %(Invalid output type "#{options[:output]}") if options[:output] && options[:output] !~ Doing::Plugins.plugin_regex(type: :export)
|
|
1485
1522
|
|
|
1486
1523
|
tag_filter = false
|
|
@@ -1545,7 +1582,12 @@ command :show do |c|
|
|
|
1545
1582
|
|
|
1546
1583
|
options[:times] = true if options[:totals]
|
|
1547
1584
|
|
|
1548
|
-
|
|
1585
|
+
template = settings['templates']['default'].deep_merge({
|
|
1586
|
+
'wrap_width' => settings['wrap_width'] || 0,
|
|
1587
|
+
'date_format' => settings['default_date_format'],
|
|
1588
|
+
'order' => settings['order'] || 'asc',
|
|
1589
|
+
'tags_color' => settings['tags_color']
|
|
1590
|
+
})
|
|
1549
1591
|
|
|
1550
1592
|
options[:case] = options[:case].normalize_case
|
|
1551
1593
|
|
|
@@ -1566,7 +1608,7 @@ command :show do |c|
|
|
|
1566
1608
|
opt[:tag] = nil
|
|
1567
1609
|
opt[:tag_filter] = tag_filter
|
|
1568
1610
|
opt[:tag_order] = options[:tag_order].normalize_order
|
|
1569
|
-
opt[:tags_color] = tags_color
|
|
1611
|
+
opt[:tags_color] = template['tags_color']
|
|
1570
1612
|
|
|
1571
1613
|
Doing::Pager.page wwid.list_section(opt)
|
|
1572
1614
|
end
|
|
@@ -1617,13 +1659,16 @@ command %i[grep search] do |c|
|
|
|
1617
1659
|
c.desc 'Only show items with recorded time intervals'
|
|
1618
1660
|
c.switch [:only_timed], default_value: false, negatable: false
|
|
1619
1661
|
|
|
1662
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
1663
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
1664
|
+
|
|
1620
1665
|
c.desc 'Force exact string matching (case sensitive)'
|
|
1621
1666
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
1622
1667
|
|
|
1623
1668
|
c.desc 'Show items that *don\'t* match search string'
|
|
1624
1669
|
c.switch [:not], default_value: false, negatable: false
|
|
1625
1670
|
|
|
1626
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
1671
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
1627
1672
|
c.arg_name 'TYPE'
|
|
1628
1673
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
1629
1674
|
|
|
@@ -1631,9 +1676,11 @@ command %i[grep search] do |c|
|
|
|
1631
1676
|
c.switch %i[i interactive], default_value: false, negatable: false
|
|
1632
1677
|
|
|
1633
1678
|
c.action do |_global_options, options, args|
|
|
1679
|
+
options[:fuzzy] = false
|
|
1634
1680
|
raise DoingRuntimeError, %(Invalid output type "#{options[:output]}") if options[:output] && options[:output] !~ Doing::Plugins.plugin_regex(type: :export)
|
|
1635
1681
|
|
|
1636
|
-
|
|
1682
|
+
template = settings['templates']['default'].deep_merge(settings)
|
|
1683
|
+
tags_color = template.key?('tags_color') ? template['tags_color'] : nil
|
|
1637
1684
|
|
|
1638
1685
|
section = wwid.guess_section(options[:section]) if options[:section]
|
|
1639
1686
|
|
|
@@ -1699,7 +1746,9 @@ command :recent do |c|
|
|
|
1699
1746
|
|
|
1700
1747
|
options[:t] = true if options[:totals]
|
|
1701
1748
|
options[:sort_tags] = options[:tag_sort] =~ /^n/i
|
|
1702
|
-
|
|
1749
|
+
|
|
1750
|
+
template = settings['templates']['recent'].deep_merge(settings['templates']['default'])
|
|
1751
|
+
tags_color = template.key?('tags_color') ? template['tags_color'] : nil
|
|
1703
1752
|
|
|
1704
1753
|
opts = {
|
|
1705
1754
|
sort_tags: options[:sort_tags],
|
|
@@ -1760,8 +1809,7 @@ command :today do |c|
|
|
|
1760
1809
|
before: options[:before],
|
|
1761
1810
|
section: options[:section],
|
|
1762
1811
|
sort_tags: options[:sort_tags],
|
|
1763
|
-
totals: options[:totals]
|
|
1764
|
-
order: settings.dig('templates', 'today', 'order')
|
|
1812
|
+
totals: options[:totals]
|
|
1765
1813
|
}
|
|
1766
1814
|
Doing::Pager.page wwid.today(options[:times], options[:output], opt).chomp
|
|
1767
1815
|
end
|
|
@@ -1963,17 +2011,21 @@ command :last do |c|
|
|
|
1963
2011
|
c.arg_name 'QUERY'
|
|
1964
2012
|
c.flag [:search]
|
|
1965
2013
|
|
|
2014
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
2015
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
2016
|
+
|
|
1966
2017
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
1967
2018
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
1968
2019
|
|
|
1969
2020
|
c.desc 'Show items that *don\'t* match search string or tag filter'
|
|
1970
2021
|
c.switch [:not], default_value: false, negatable: false
|
|
1971
2022
|
|
|
1972
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
2023
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
1973
2024
|
c.arg_name 'TYPE'
|
|
1974
2025
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
1975
2026
|
|
|
1976
2027
|
c.action do |global_options, options, _args|
|
|
2028
|
+
options[:fuzzy] = false
|
|
1977
2029
|
raise InvalidArgument, '--tag and --search can not be used together' if options[:tag] && options[:search]
|
|
1978
2030
|
|
|
1979
2031
|
if options[:tag].nil?
|
|
@@ -2001,10 +2053,10 @@ command :last do |c|
|
|
|
2001
2053
|
end
|
|
2002
2054
|
|
|
2003
2055
|
if options[:editor]
|
|
2004
|
-
wwid.edit_last(section: options[:s], options: { search: search, case: options[:case], tag: tags, tag_bool: options[:bool], not: options[:not] })
|
|
2056
|
+
wwid.edit_last(section: options[:s], options: { search: search, fuzzy: options[:fuzzy], case: options[:case], tag: tags, tag_bool: options[:bool], not: options[:not] })
|
|
2005
2057
|
else
|
|
2006
2058
|
Doing::Pager::page wwid.last(times: true, section: options[:s],
|
|
2007
|
-
options: { search: search, case: options[:case], negate: options[:not], tag: tags, tag_bool: options[:bool] }).strip
|
|
2059
|
+
options: { search: search, fuzzy: options[:fuzzy], case: options[:case], negate: options[:not], tag: tags, tag_bool: options[:bool] }).strip
|
|
2008
2060
|
end
|
|
2009
2061
|
end
|
|
2010
2062
|
end
|
|
@@ -2162,13 +2214,16 @@ command :view do |c|
|
|
|
2162
2214
|
c.arg_name 'QUERY'
|
|
2163
2215
|
c.flag [:search]
|
|
2164
2216
|
|
|
2217
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
2218
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
2219
|
+
|
|
2165
2220
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
2166
2221
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
2167
2222
|
|
|
2168
2223
|
c.desc 'Show items that *don\'t* match search string'
|
|
2169
2224
|
c.switch [:not], default_value: false, negatable: false
|
|
2170
2225
|
|
|
2171
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
2226
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
2172
2227
|
c.arg_name 'TYPE'
|
|
2173
2228
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
2174
2229
|
|
|
@@ -2195,6 +2250,7 @@ command :view do |c|
|
|
|
2195
2250
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
2196
2251
|
|
|
2197
2252
|
c.action do |global_options, options, args|
|
|
2253
|
+
options[:fuzzy] = false
|
|
2198
2254
|
raise DoingRuntimeError, %(Invalid output type "#{options[:output]}") if options[:output] && options[:output] !~ Doing::Plugins.plugin_regex(type: :export)
|
|
2199
2255
|
|
|
2200
2256
|
raise InvalidArgument, '--tag and --search can not be used together' if options[:tag] && options[:search]
|
|
@@ -2229,6 +2285,7 @@ command :view do |c|
|
|
|
2229
2285
|
|
|
2230
2286
|
template = view.key?('template') ? view['template'] : nil
|
|
2231
2287
|
date_format = view.key?('date_format') ? view['date_format'] : nil
|
|
2288
|
+
|
|
2232
2289
|
tags_color = view.key?('tags_color') ? view['tags_color'] : nil
|
|
2233
2290
|
tag_filter = false
|
|
2234
2291
|
if options[:tag]
|
|
@@ -2386,13 +2443,16 @@ command %i[archive move] do |c|
|
|
|
2386
2443
|
c.arg_name 'QUERY'
|
|
2387
2444
|
c.flag [:search]
|
|
2388
2445
|
|
|
2446
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
2447
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
2448
|
+
|
|
2389
2449
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
2390
2450
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
2391
2451
|
|
|
2392
2452
|
c.desc 'Show items that *don\'t* match search string'
|
|
2393
2453
|
c.switch [:not], default_value: false, negatable: false
|
|
2394
2454
|
|
|
2395
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
2455
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
2396
2456
|
c.arg_name 'TYPE'
|
|
2397
2457
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
2398
2458
|
|
|
@@ -2402,6 +2462,7 @@ command %i[archive move] do |c|
|
|
|
2402
2462
|
c.flag [:before]
|
|
2403
2463
|
|
|
2404
2464
|
c.action do |_global_options, options, args|
|
|
2465
|
+
options[:fuzzy] = false
|
|
2405
2466
|
if args.empty?
|
|
2406
2467
|
section = settings['current_section']
|
|
2407
2468
|
tags = []
|
|
@@ -2464,13 +2525,16 @@ command :rotate do |c|
|
|
|
2464
2525
|
c.arg_name 'QUERY'
|
|
2465
2526
|
c.flag [:search]
|
|
2466
2527
|
|
|
2528
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
2529
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
2530
|
+
|
|
2467
2531
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
2468
2532
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
2469
2533
|
|
|
2470
2534
|
c.desc 'Rotate items that *don\'t* match search string or tag filter'
|
|
2471
2535
|
c.switch [:not], default_value: false, negatable: false
|
|
2472
2536
|
|
|
2473
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
2537
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
2474
2538
|
c.arg_name 'TYPE'
|
|
2475
2539
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
2476
2540
|
|
|
@@ -2480,6 +2544,7 @@ command :rotate do |c|
|
|
|
2480
2544
|
c.flag [:before]
|
|
2481
2545
|
|
|
2482
2546
|
c.action do |_global_options, options, args|
|
|
2547
|
+
options[:fuzzy] = false
|
|
2483
2548
|
if options[:section] && options[:section] !~ /^all$/i
|
|
2484
2549
|
options[:section] = wwid.guess_section(options[:section])
|
|
2485
2550
|
end
|
|
@@ -2599,7 +2664,7 @@ command :config do |c|
|
|
|
2599
2664
|
when /^j/
|
|
2600
2665
|
JSON.pretty_generate(cfg)
|
|
2601
2666
|
when /^r/
|
|
2602
|
-
cfg
|
|
2667
|
+
cfg.map {|k, v| v.to_s }
|
|
2603
2668
|
else
|
|
2604
2669
|
YAML.dump(cfg)
|
|
2605
2670
|
end
|
|
@@ -2684,13 +2749,16 @@ command :import do |c|
|
|
|
2684
2749
|
c.arg_name 'QUERY'
|
|
2685
2750
|
c.flag [:search]
|
|
2686
2751
|
|
|
2752
|
+
# c.desc '[DEPRECATED] Use alternative fuzzy matching for search string'
|
|
2753
|
+
# c.switch [:fuzzy], default_value: false, negatable: false
|
|
2754
|
+
|
|
2687
2755
|
c.desc 'Force exact search string matching (case sensitive)'
|
|
2688
2756
|
c.switch %i[x exact], default_value: false, negatable: false
|
|
2689
2757
|
|
|
2690
2758
|
c.desc 'Import items that *don\'t* match search/tag/date filters'
|
|
2691
2759
|
c.switch [:not], default_value: false, negatable: false
|
|
2692
2760
|
|
|
2693
|
-
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)
|
|
2761
|
+
c.desc 'Case sensitivity for search string matching [(c)ase-sensitive, (i)gnore, (s)mart]'
|
|
2694
2762
|
c.arg_name 'TYPE'
|
|
2695
2763
|
c.flag [:case], must_match: /^[csi]/, default_value: 'smart'
|
|
2696
2764
|
|
|
@@ -2732,7 +2800,7 @@ command :import do |c|
|
|
|
2732
2800
|
c.switch [:overlap], negatable: true
|
|
2733
2801
|
|
|
2734
2802
|
c.action do |_global_options, options, args|
|
|
2735
|
-
|
|
2803
|
+
options[:fuzzy] = false
|
|
2736
2804
|
if options[:section]
|
|
2737
2805
|
options[:section] = wwid.guess_section(options[:section]) || options[:section].cap_first
|
|
2738
2806
|
end
|
data/doc/Array.html
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Class: Array
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.26
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Array";
|
|
19
|
+
relpath = '';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="_index.html">Index (A)</a> »
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<span class="title">Array</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Class: Array
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName">Object</span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">Array</li>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
81
|
+
|
|
82
|
+
</dd>
|
|
83
|
+
</dl>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<dl>
|
|
96
|
+
<dt>Defined in:</dt>
|
|
97
|
+
<dd>lib/doing/array.rb</dd>
|
|
98
|
+
</dl>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
|
103
|
+
<div class="discussion">
|
|
104
|
+
<p>Array helpers</p>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="tags">
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
</div><div id="subclasses">
|
|
113
|
+
<h2>Direct Known Subclasses</h2>
|
|
114
|
+
<p class="children"><span class='object_link'><a href="Doing/Items.html" title="Doing::Items (class)">Doing::Items</a></span>, <span class='object_link'><a href="Doing/Note.html" title="Doing::Note (class)">Doing::Note</a></span></p>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div id="footer">
|
|
128
|
+
Generated on Thu Nov 18 16:39:12 2021 by
|
|
129
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
130
|
+
0.9.26 (ruby-3.0.1).
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
</div>
|
|
134
|
+
</body>
|
|
135
|
+
</html>
|