doing 2.1.17 → 2.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +15 -14
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +117 -53
  6. data/Gemfile.lock +11 -11
  7. data/README.md +1 -1
  8. data/Rakefile +12 -4
  9. data/bin/doing +161 -205
  10. data/docs/doc/Array.html +9 -37
  11. data/docs/doc/BooleanTermParser/Clause.html +3 -3
  12. data/docs/doc/BooleanTermParser/Operator.html +3 -3
  13. data/docs/doc/BooleanTermParser/Query.html +3 -3
  14. data/docs/doc/BooleanTermParser/QueryParser.html +3 -3
  15. data/docs/doc/BooleanTermParser/QueryTransformer.html +3 -3
  16. data/docs/doc/BooleanTermParser.html +3 -3
  17. data/docs/doc/Doing/Color.html +3 -3
  18. data/docs/doc/Doing/Completion.html +3 -3
  19. data/docs/doc/Doing/Configuration.html +4 -3
  20. data/docs/doc/Doing/Errors/DoingNoTraceError.html +3 -3
  21. data/docs/doc/Doing/Errors/DoingRuntimeError.html +3 -3
  22. data/docs/doc/Doing/Errors/DoingStandardError.html +3 -3
  23. data/docs/doc/Doing/Errors/EmptyInput.html +3 -3
  24. data/docs/doc/Doing/Errors/NoResults.html +3 -3
  25. data/docs/doc/Doing/Errors/PluginException.html +3 -3
  26. data/docs/doc/Doing/Errors/UserCancelled.html +3 -3
  27. data/docs/doc/Doing/Errors/WrongCommand.html +3 -3
  28. data/docs/doc/Doing/Errors.html +3 -3
  29. data/docs/doc/Doing/Hooks.html +3 -3
  30. data/docs/doc/Doing/Item.html +3 -3
  31. data/docs/doc/Doing/Items.html +3 -3
  32. data/docs/doc/Doing/LogAdapter.html +3 -3
  33. data/docs/doc/Doing/Note.html +3 -3
  34. data/docs/doc/Doing/Pager.html +3 -3
  35. data/docs/doc/Doing/Plugins.html +3 -3
  36. data/docs/doc/Doing/Prompt.html +7 -7
  37. data/docs/doc/Doing/Section.html +3 -3
  38. data/docs/doc/Doing/TemplateString.html +4 -4
  39. data/docs/doc/Doing/Util/Backup.html +3 -3
  40. data/docs/doc/Doing/Util.html +3 -3
  41. data/docs/doc/Doing/WWID.html +66 -8
  42. data/docs/doc/Doing.html +6 -6
  43. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +3 -3
  44. data/docs/doc/GLI/Commands.html +3 -3
  45. data/docs/doc/GLI.html +3 -3
  46. data/docs/doc/Hash.html +78 -6
  47. data/docs/doc/Numeric.html +3 -3
  48. data/docs/doc/PhraseParser/Operator.html +3 -3
  49. data/docs/doc/PhraseParser/PhraseClause.html +3 -3
  50. data/docs/doc/PhraseParser/Query.html +3 -3
  51. data/docs/doc/PhraseParser/QueryParser.html +3 -3
  52. data/docs/doc/PhraseParser/QueryTransformer.html +3 -3
  53. data/docs/doc/PhraseParser/TermClause.html +3 -3
  54. data/docs/doc/PhraseParser.html +3 -3
  55. data/docs/doc/Status.html +3 -3
  56. data/docs/doc/String.html +156 -17
  57. data/docs/doc/Symbol.html +3 -3
  58. data/docs/doc/Time.html +3 -3
  59. data/docs/doc/_index.html +23 -16
  60. data/docs/doc/class_list.html +1 -1
  61. data/docs/doc/file.README.html +4 -4
  62. data/docs/doc/frames.html +1 -1
  63. data/docs/doc/index.html +4 -4
  64. data/docs/doc/method_list.html +331 -283
  65. data/docs/doc/top-level-namespace.html +3 -3
  66. data/doing.gemspec +1 -1
  67. data/doing.rdoc +26 -12
  68. data/lib/completion/_doing.zsh +5 -5
  69. data/lib/completion/doing.bash +8 -8
  70. data/lib/completion/doing.fish +93 -15
  71. data/lib/doing/array.rb +5 -4
  72. data/lib/doing/array_chronify.rb +4 -3
  73. data/lib/doing/completion/fish_completion.rb +80 -11
  74. data/lib/doing/configuration.rb +2 -1
  75. data/lib/doing/hash.rb +22 -4
  76. data/lib/doing/item.rb +2 -2
  77. data/lib/doing/items.rb +3 -1
  78. data/lib/doing/log_adapter.rb +1 -1
  79. data/lib/doing/pager.rb +2 -2
  80. data/lib/doing/plugins/export/dayone_export.rb +1 -1
  81. data/lib/doing/plugins/export/markdown_export.rb +1 -1
  82. data/lib/doing/plugins/export/template_export.rb +8 -2
  83. data/lib/doing/prompt.rb +4 -2
  84. data/lib/doing/string.rb +25 -2
  85. data/lib/doing/string_chronify.rb +55 -17
  86. data/lib/doing/template_string.rb +7 -0
  87. data/lib/doing/types.rb +23 -0
  88. data/lib/doing/version.rb +1 -1
  89. data/lib/doing/wwid.rb +71 -50
  90. data/lib/doing.rb +1 -0
  91. data/lib/examples/commands/later.rb +32 -0
  92. data/lib/helpers/threaded_tests.rb +273 -0
  93. metadata +9 -6
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.27
10
10
 
11
11
  </title>
12
12
 
@@ -102,9 +102,9 @@
102
102
  </div>
103
103
 
104
104
  <div id="footer">
105
- Generated on Tue Jan 18 07:38:21 2022 by
105
+ Generated on Fri Jan 21 14:53:33 2022 by
106
106
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
107
- 0.9.26 (ruby-3.0.1).
107
+ 0.9.27 (ruby-3.0.1).
108
108
  </div>
109
109
 
110
110
  </div>
data/doing.gemspec CHANGED
@@ -33,7 +33,7 @@ spec = Gem::Specification.new do |s|
33
33
  s.add_development_dependency 'parallel_tests', '~> 3.7', '>= 3.7.3'
34
34
  s.add_development_dependency 'tty-spinner', '~> 0.9', '>= 0.9.3'
35
35
  s.add_runtime_dependency('tty-progressbar', '~> 0.18', '>= 0.18.2')
36
- s.add_runtime_dependency('gli', '~> 2.19', '>= 2.19.2')
36
+ s.add_runtime_dependency('gli', '~> 2.20', '>= 2.20.1')
37
37
  s.add_runtime_dependency('haml','~>5.0.0', '>= 5.0.0')
38
38
  s.add_runtime_dependency('chronic','~> 0.10', '>= 0.10.2')
39
39
  s.add_runtime_dependency('deep_merge', '~> 1.2', '>= 1.2.1')
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.17
8
+ v2.1.22
9
9
 
10
10
  === Global Options
11
11
  === --config_file arg
@@ -32,7 +32,7 @@ Verbose output
32
32
 
33
33
 
34
34
 
35
- === --[no-]default
35
+ === --default
36
36
  Answer yes/no menus with default option
37
37
 
38
38
 
@@ -92,6 +92,13 @@ Repeat last entry as new entry
92
92
 
93
93
  This command is designed to allow multiple time intervals to be created for an entry by duplicating it with a new start (and end, eventually) time
94
94
  ===== Options
95
+ ===== -b|--back|--started DATE_STRING
96
+
97
+ Backdate start date by interval or set to time [4pm|20m|2h|"yesterday noon"]
98
+
99
+ [Default Value] None
100
+
101
+
95
102
  ===== --bool BOOLEAN
96
103
 
97
104
  Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
@@ -521,7 +528,7 @@ Update default config file, adding any missing keys
521
528
 
522
529
 
523
530
  [Default Command] edit
524
- ==== Command: <tt>done|did ENTRY</tt>
531
+ ==== Command: <tt>done|did [ENTRY]</tt>
525
532
  Add a completed item with @done(date). No argument finishes last entry
526
533
 
527
534
  Use this command to add an entry after you've already finished it. It will be immediately marked as @done.
@@ -549,6 +556,7 @@ Start and end times as a date/time range `doing done --from "1am to 8am"`.
549
556
  Overrides other date flags.
550
557
 
551
558
  [Default Value] None
559
+ [Must Match] (?i-mx:^\S+ +(?:to|through|thru|(?:un)?til|-+) ++\S+)
552
560
 
553
561
 
554
562
  ===== -n|--note TEXT
@@ -604,19 +612,19 @@ Finish last entry not already marked @done
604
612
 
605
613
 
606
614
 
607
- ==== Command: <tt>finish COUNT</tt>
615
+ ==== Command: <tt>finish [COUNT]</tt>
608
616
  Mark last X entries as @done
609
617
 
610
618
  Marks the last X entries with a @done tag and current date. Does not alter already completed entries.
611
619
  ===== Options
612
- ===== --at DATE_STRING
620
+ ===== --at|--finished DATE_STRING
613
621
 
614
622
  Set finish date to specific date/time (natural langauge parsed, e.g. --at=1:30pm). If used, ignores --back.
615
623
 
616
624
  [Default Value] None
617
625
 
618
626
 
619
- ===== -b|--back DATE_STRING
627
+ ===== -b|--back|--started DATE_STRING
620
628
 
621
629
  Backdate completed date to date string [4pm|20m|2h|yesterday noon]
622
630
 
@@ -1039,7 +1047,7 @@ Add an item to the Later section
1039
1047
 
1040
1048
 
1041
1049
  ===== Options
1042
- ===== -b|--back DATE_STRING
1050
+ ===== -b|--back|--started DATE_STRING
1043
1051
 
1044
1052
  Backdate start time to date string [4pm|20m|2h|yesterday noon]
1045
1053
 
@@ -1157,7 +1165,7 @@ Force exact search string matching (case sensitive)
1157
1165
 
1158
1166
 
1159
1167
 
1160
- ==== Command: <tt>meanwhile ENTRY</tt>
1168
+ ==== Command: <tt>meanwhile [ENTRY]</tt>
1161
1169
  Finish any running @meanwhile tasks and optionally create a new one
1162
1170
 
1163
1171
  The @meanwhile tag allows you to have long-running entries that encompass smaller entries.
@@ -1165,7 +1173,7 @@ This command makes it easy to start and stop these overarching entries. Just run
1165
1173
  big project` to start a @meanwhile entry, add other entries as you work on the project, then use `doing meanwhile` by
1166
1174
  itself to mark the entry as @done.
1167
1175
  ===== Options
1168
- ===== -b|--back DATE_STRING
1176
+ ===== -b|--back|--started DATE_STRING
1169
1177
 
1170
1178
  Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]
1171
1179
 
@@ -1201,7 +1209,7 @@ Edit entry with vim
1201
1209
 
1202
1210
 
1203
1211
 
1204
- ==== Command: <tt>note NOTE_TEXT</tt>
1212
+ ==== Command: <tt>note [NOTE_TEXT]</tt>
1205
1213
  Add a note to the last entry
1206
1214
 
1207
1215
  If -r is provided with no other arguments, the last note is removed.
@@ -1465,7 +1473,7 @@ Show intervals with totals at the end of output
1465
1473
 
1466
1474
 
1467
1475
 
1468
- ==== Command: <tt>reset|begin DATE_STRING</tt>
1476
+ ==== Command: <tt>reset|begin [DATE_STRING]</tt>
1469
1477
  Reset the start time of an entry
1470
1478
 
1471
1479
  Update the start time of the last entry or the last entry matching a tag/search filter.
@@ -1522,6 +1530,11 @@ Select from a menu of matching entries
1522
1530
 
1523
1531
 
1524
1532
 
1533
+ ===== -n
1534
+ Change start date but do not remove @done (shortcut for --no-resume)
1535
+
1536
+
1537
+
1525
1538
  ===== --not
1526
1539
  Reset items that *don't* match search/tag filters
1527
1540
 
@@ -2282,7 +2295,7 @@ View entries before specified time (e.g. 8am, 12:30pm, 15:00)
2282
2295
  [Default Value] None
2283
2296
 
2284
2297
 
2285
- ===== --from DATE_OR_RANGE
2298
+ ===== --from TIME_RANGE
2286
2299
 
2287
2300
  Time range to show `doing today --from "12pm to 4pm"`
2288
2301
 
@@ -2615,6 +2628,7 @@ View entries before specified time (e.g. 8am, 12:30pm, 15:00)
2615
2628
  Time range to show, e.g. `doing yesterday --from "1am to 8am"`
2616
2629
 
2617
2630
  [Default Value] None
2631
+ [Must Match] (?i-mx:^(?:\d{1,2}+(?::\d{1,2}+)?(?: *(?:am|pm))?|midnight|noon) +(?:to|through|thru|(?:un)?til|-+) +(?:\d{1,2}+(?::\d{1,2}+)?(?: *(?:am|pm))?|midnight|noon)$)
2618
2632
 
2619
2633
 
2620
2634
  ===== -o|--output FORMAT
@@ -70,10 +70,10 @@ function _doing() {
70
70
  args=( )
71
71
  ;;
72
72
  again)
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]" )
73
+ args=( "(--ask)--ask}[Prompt for note via multi-line input]" "(--started=)--started=}[Backdate start date by interval or set to time [4pm|20m|2h|"yesterday noon"]]" "(--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=( "(--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]" )
76
+ args=( "(--ask)--ask}[Prompt for note via multi-line input]" "(--started=)--started=}[Backdate start date by interval or set to time [4pm|20m|2h|"yesterday noon"]]" "(--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]" )
@@ -112,7 +112,7 @@ function _doing() {
112
112
  args=( {-a,--archive}"[Immediately archive the entry]" "(--ask)--ask}[Prompt for note via multi-line input]" "(--finished=)--finished=}[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]" "(--from=)--from=}[Start and end times as a date/time range `doing done --from "1am to 8am"`]" {-n,--note=}"[Include a note]" {-r,--remove}"[Remove @done tag]" {-s,--section=}"[Section]" "(--for=)--for=}[Set completion date to start date plus interval]" {-u,--unfinished}"[Finish last entry not already marked @done]" )
113
113
  ;;
114
114
  finish)
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]" "(--for=)--for=}[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]" )
115
+ args=( {-a,--archive}"[Archive entries]" "(--finished=)--finished=}[Set finish date to specific date/time]" "(--auto)--auto}[Auto-generate finish dates from next entrys start times start time]" "(--started=)--started=}[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]" "(--for=)--for=}[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]" )
116
116
  ;;
117
117
  grep)
118
118
  args=( "(--after=)--after=}[Search entries newer than date]" "(--before=)--before=}[Search entries older than date]" "(--bool=)--bool=}[Combine multiple tags or value queries using AND]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--delete}"[Delete matching entries]" "(--duration)--duration}[Show elapsed time on entries without @done tag]" {-e,--editor}"[Edit matching entries with vim]" "(--from=)--from=}[Date range to show]" {-h,--hilite}"[Highlight search matches in output]" {-i,--interactive}"[Display an interactive menu of results to perform further operations]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--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 string matching]" )
@@ -130,7 +130,7 @@ function _doing() {
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]" {-h,--hilite}"[Highlight search matches in output]" "(--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=( "(--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]" )
133
+ args=( "(--ask)--ask}[Prompt for note via multi-line input]" "(--started=)--started=}[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,7 +139,7 @@ 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]" "(--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]" )
142
+ args=( {-a,--archive}"[Archive previous @meanwhile entry]" "(--ask)--ask}[Prompt for note via multi-line input]" "(--started=)--started=}[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
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]" )
@@ -1,9 +1,9 @@
1
1
  _doing_again() {
2
2
 
3
3
  if [[ "$token" == --* ]]; then
4
- COMPREPLY=( $( compgen -W '--ask --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
4
+ COMPREPLY=( $( compgen -W '--ask --started --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 --ask --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
6
+ COMPREPLY=( $( compgen -W '-e -i -n -s -x --ask --started --bool --case --editor --interactive --in --note --not --section --search --tag --val --exact' -- $token ) )
7
7
 
8
8
  fi
9
9
  }
@@ -91,9 +91,9 @@ _doing_done() {
91
91
  _doing_finish() {
92
92
 
93
93
  if [[ "$token" == --* ]]; then
94
- COMPREPLY=( $( compgen -W '--archive --at --auto --back --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --val --exact' -- $token ) )
94
+ COMPREPLY=( $( compgen -W '--archive --finished --auto --started --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --val --exact' -- $token ) )
95
95
  elif [[ "$token" == -* ]]; then
96
- COMPREPLY=( $( compgen -W '-a -b -i -r -s -u -x --archive --at --auto --back --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --val --exact' -- $token ) )
96
+ COMPREPLY=( $( compgen -W '-a -i -r -s -u -x --archive --finished --auto --started --bool --case --date --interactive --not --remove --section --search --for --tag --unfinished --val --exact' -- $token ) )
97
97
 
98
98
  fi
99
99
  }
@@ -141,9 +141,9 @@ _doing_last() {
141
141
  _doing_later() {
142
142
 
143
143
  if [[ "$token" == --* ]]; then
144
- COMPREPLY=( $( compgen -W '--ask --back --editor --note' -- $token ) )
144
+ COMPREPLY=( $( compgen -W '--ask --started --editor --note' -- $token ) )
145
145
  elif [[ "$token" == -* ]]; then
146
- COMPREPLY=( $( compgen -W '-b -e -n --ask --back --editor --note' -- $token ) )
146
+ COMPREPLY=( $( compgen -W '-e -n --ask --started --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 --ask --back --editor --note --section' -- $token ) )
164
+ COMPREPLY=( $( compgen -W '--archive --ask --started --editor --note --section' -- $token ) )
165
165
  elif [[ "$token" == -* ]]; then
166
- COMPREPLY=( $( compgen -W '-a -b -e -n -s --archive --ask --back --editor --note --section' -- $token ) )
166
+ COMPREPLY=( $( compgen -W '-a -e -n -s --archive --ask --started --editor --note --section' -- $token ) )
167
167
 
168
168
  fi
169
169
  }
@@ -23,28 +23,97 @@ function __fish_doing_using_command
23
23
  and return 0
24
24
  end
25
25
 
26
+ function __fish_doing_cache_timer_expired
27
+ set -l timer __fish_doing_cache_timer_$argv[1]
28
+ if not set -q $timer
29
+ set -g $timer (date '+%s')
30
+ end
31
+
32
+ if test (math (date '+%s') - $$timer) -gt $argv[2]
33
+ set -g $timer (date '+%s')
34
+ return 1
35
+ end
36
+
37
+ return 0
38
+ end
39
+
40
+ function __fish_doing_subcommands
41
+ if not set -q __fish_doing_subcommands_cache
42
+ or __fish_doing_cache_timer_expired subcommands 86400
43
+ set -g -a __fish_doing_subcommands_cache (doing help -c)
44
+ end
45
+ printf '%s
46
+ ' $__fish_doing_subcommands_cache
47
+ end
48
+
26
49
  function __fish_doing_complete_sections
27
- doing sections -c
50
+ if not set -q __fish_doing_sections_cache
51
+ or __fish_doing_cache_timer_expired sections 3600
52
+ set -g -a __fish_doing_sections_cache (doing sections -c)
53
+ end
54
+ printf '%s
55
+ ' $__fish_doing_sections_cache
56
+ __fish_doing_complete_show_tag
28
57
  end
29
58
 
30
59
  function __fish_doing_complete_views
31
- doing views -c
60
+ if not set -q __fish_doing_views_cache
61
+ or __fish_doing_cache_timer_expired views 3600
62
+ set -g -a __fish_doing_views_cache (doing views -c)
63
+ end
64
+ printf '%s
65
+ ' $__fish_doing_views_cache
32
66
  end
33
67
 
34
- function __fish_doing_subcommands
35
- doing help -c
68
+ function __fish_doing_export_plugin
69
+ if not set -q __fish_doing_export_plugin_cache
70
+ or __fish_doing_cache_timer_expired export_plugins 3600
71
+ set -g -a __fish_doing_export_plugin_cache (doing plugins --type export -c)
72
+ end
73
+ printf '%s
74
+ ' $__fish_doing_export_plugin_cache
75
+ end
76
+
77
+ function __fish_doing_import_plugin
78
+ if not set -q __fish_doing_import_plugin_cache
79
+ or __fish_doing_cache_timer_expired import_plugins 3600
80
+ set -g -a __fish_doing_import_plugin_cache (doing plugins --type import -c)
81
+ end
82
+ printf '%s
83
+ ' $__fish_doing_import_plugin_cache
84
+ end
85
+
86
+ function __fish_doing_complete_template
87
+ if not set -q __fish_doing_template_cache
88
+ or __fish_doing_cache_timer_expired template 3600
89
+ set -g -a __fish_doing_template_cache (doing template -c)
90
+ end
91
+ printf '%s
92
+ ' $__fish_doing_template_cache
36
93
  end
37
94
 
38
- function __fish_doing_export_plugins
39
- doing plugins --type export -c
95
+ function __fish_doing_complete_tag
96
+ if not set -q __fish_doing_tag_cache
97
+ or __fish_doing_cache_timer_expired tags 60
98
+ set -g -a __fish_doing_tag_cache (doing tags)
99
+ end
100
+ printf '%s
101
+ ' $__fish_doing_tag_cache
40
102
  end
41
103
 
42
- function __fish_doing_import_plugins
43
- doing plugins --type import -c
104
+ function __fish_doing_complete_show_tag
105
+ if not set -q __fish_doing_tag_cache
106
+ or __fish_doing_cache_timer_expired tags 60
107
+ set -g -a __fish_doing_tag_cache (doing tags)
108
+ end
109
+ printf '@%s
110
+ ' $__fish_doing_tag_cache
44
111
  end
45
112
 
46
- function __fish_doing_complete_templates
47
- doing template -c
113
+ function __fish_doing_complete_args
114
+ for cmd in (doing commands_accepting -c $argv[1])
115
+ complete -x -c doing -l $argv[1] -n "__fish_doing_using_command $cmd" -a "(__fish_doing_complete_$argv[1])"
116
+ end
48
117
  end
49
118
 
50
119
  complete -c doing -f
@@ -57,6 +126,14 @@ complete -f -c doing -s t -l type -x -n '__fish_doing_using_command import' -a '
57
126
 
58
127
  complete -xc doing -n '__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from (doing help -c)' -a "(doing help -c)"
59
128
 
129
+ function __fish_doing_complete_args
130
+ for cmd in (doing commands_accepting -c $argv[1])
131
+ complete -x -c doing -l $argv[1] -n "__fish_doing_using_command $cmd" -a "(__fish_doing_complete_$argv[1])"
132
+ end
133
+ end
134
+
135
+ __fish_doing_complete_args tag
136
+
60
137
  complete -xc doing -n '__fish_doing_needs_command' -a 'add_section' -d Add\ a\ new\ section\ to\ the\ \"doing\"\ file
61
138
  complete -xc doing -n '__fish_doing_needs_command' -a 'again resume' -d Repeat\ last\ entry\ as\ new\ entry
62
139
  complete -xc doing -n '__fish_doing_needs_command' -a 'archive move' -d Move\ entries\ between\ sections
@@ -100,6 +177,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'views' -d List\ available
100
177
  complete -xc doing -n '__fish_doing_needs_command' -a 'wiki' -d Output\ a\ tag\ wiki
101
178
  complete -xc doing -n '__fish_doing_needs_command' -a 'yesterday' -d List\ entries\ from\ yesterday
102
179
  complete -c doing -l ask -f -n '__fish_doing_using_command again resume' -d Prompt\ for\ note\ via\ multi-line\ input
180
+ complete -c doing -l started -f -r -n '__fish_doing_using_command again resume' -d Backdate\ start\ date\ by\ interval\ or\ set\ to\ time\ \[4pm\|20m\|2h\|\"yesterday\ noon\"\]
103
181
  complete -c doing -l bool -f -r -n '__fish_doing_using_command again resume' -d Boolean\ used\ to\ combine\ multiple\ tags
104
182
  complete -c doing -l case -f -r -n '__fish_doing_using_command again resume' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
105
183
  complete -c doing -l editor -s e -f -n '__fish_doing_using_command again resume' -d Edit\ duplicated\ entry\ with\ vim\ before\ adding
@@ -159,9 +237,9 @@ complete -c doing -l section -s s -f -r -n '__fish_doing_using_command done did'
159
237
  complete -c doing -l for -f -r -n '__fish_doing_using_command done did' -d Set\ completion\ date\ to\ start\ date\ plus\ interval
160
238
  complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command done did' -d Finish\ last\ entry\ not\ already\ marked\ @done
161
239
  complete -c doing -l archive -s a -f -n '__fish_doing_using_command finish' -d Archive\ entries
162
- complete -c doing -l at -f -r -n '__fish_doing_using_command finish' -d Set\ finish\ date\ to\ specific\ date/time
240
+ complete -c doing -l finished -f -r -n '__fish_doing_using_command finish' -d Set\ finish\ date\ to\ specific\ date/time
163
241
  complete -c doing -l auto -f -n '__fish_doing_using_command finish' -d Auto-generate\ finish\ dates\ from\ next\ entry\'s\ start\ time
164
- 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\]
242
+ complete -c doing -l started -f -r -n '__fish_doing_using_command finish' -d Backdate\ completed\ date\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
165
243
  complete -c doing -l bool -f -r -n '__fish_doing_using_command finish' -d Boolean
166
244
  complete -c doing -l case -f -r -n '__fish_doing_using_command finish' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
167
245
  complete -c doing -l date -f -n '__fish_doing_using_command finish' -d Include\ date
@@ -222,7 +300,7 @@ complete -c doing -l tag -f -r -n '__fish_doing_using_command last' -d Tag\ fil
222
300
  complete -c doing -l val -f -r -n '__fish_doing_using_command last' -d Perform\ a\ tag\ value\ query
223
301
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command last' -d Force\ exact\ search\ string\ matching
224
302
  complete -c doing -l ask -f -n '__fish_doing_using_command later' -d Prompt\ for\ note\ via\ multi-line\ input
225
- 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\]
303
+ complete -c doing -l started -f -r -n '__fish_doing_using_command later' -d Backdate\ start\ time\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
226
304
  complete -c doing -l editor -s e -f -n '__fish_doing_using_command later' -d Edit\ entry\ with\ vim
227
305
  complete -c doing -l note -s n -f -r -n '__fish_doing_using_command later' -d Note
228
306
  complete -c doing -l bool -f -r -n '__fish_doing_using_command mark flag' -d Boolean
@@ -241,7 +319,7 @@ complete -c doing -l val -f -r -n '__fish_doing_using_command mark flag' -d Per
241
319
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command mark flag' -d Force\ exact\ search\ string\ matching
242
320
  complete -c doing -l archive -s a -f -n '__fish_doing_using_command meanwhile' -d Archive\ previous\ @meanwhile\ entry
243
321
  complete -c doing -l ask -f -n '__fish_doing_using_command meanwhile' -d Prompt\ for\ note\ via\ multi-line\ input
244
- 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\]
322
+ complete -c doing -l started -f -r -n '__fish_doing_using_command meanwhile' -d Backdate\ start\ date\ for\ new\ entry\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
245
323
  complete -c doing -l editor -s e -f -n '__fish_doing_using_command meanwhile' -d Edit\ entry\ with\ vim
246
324
  complete -c doing -l note -s n -f -r -n '__fish_doing_using_command meanwhile' -d Note
247
325
  complete -c doing -l section -s s -f -r -n '__fish_doing_using_command meanwhile' -d Section
@@ -444,7 +522,7 @@ complete -c doing -l times -s t -f -n '__fish_doing_using_command yesterday' -d
444
522
  complete -c doing -l tag_order -f -r -n '__fish_doing_using_command yesterday' -d Tag\ sort\ direction
445
523
  complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command yesterday' -d Sort\ tags\ by
446
524
  complete -c doing -l totals -f -n '__fish_doing_using_command yesterday' -d Show\ time\ totals\ at\ the\ end\ of\ output
447
- complete -f -c doing -s o -l output -x -n '__fish_doing_using_command grep search on select show since today view yesterday' -a '(__fish_doing_export_plugins)'
525
+ complete -f -c doing -s o -l output -x -n '__fish_doing_using_command grep search on select show since today view yesterday' -a '(__fish_doing_export_plugin)'
448
526
  complete -f -c doing -s b -l bool -x -n '__fish_doing_using_command again resume archive move autotag cancel finish grep search last mark flag note reset begin rotate show tag tags view wiki' -a 'and or not pattern'
449
527
  complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel finish grep search import last mark flag note reset begin rotate select show show tag tags tags view' -a 'case-sensitive ignore smart'
450
528
  complete -f -c doing -l tag_sort -x -n '__fish_doing_using_command grep search on recent show since today view yesterday' -a 'name time'
data/lib/doing/array.rb CHANGED
@@ -11,17 +11,18 @@ module Doing
11
11
  ## @return [Array] array of strings
12
12
  ##
13
13
  def tags_to_array
14
- map { |t| t.sub(/^@/, '') }
14
+ map(&:remove_at)
15
15
  end
16
16
 
17
17
  # Convert strings to @tags
18
18
  #
19
- # @example `['one', '@two', 'three'].to_tags`
20
- # @example `=> ['@one', '@two', '@three']`
21
19
  # @return [Array] Array of @tags
22
20
  #
21
+ # @example
22
+ # ['one', '@two', 'three'].to_tags
23
+ # # => ['@one', '@two', '@three']
23
24
  def to_tags
24
- map { |t| t.sub(/^@?/, '@') }
25
+ map(&:add_at)
25
26
  end
26
27
 
27
28
  def to_tags!
@@ -6,9 +6,10 @@ module Doing
6
6
  ##
7
7
  ## Format [d, h, m] as string
8
8
  ##
9
- ## @param time [Array] Array of [days, hours,
10
- ## minutes]
11
- ## @param format [Symbol] The format, :dhm, :hm, :m, :clock, :natural
9
+ ## @accept [Array] Array of [days, hours, minutes]
10
+ ##
11
+ ## @param format [Symbol] The format, :dhm, :hm,
12
+ ## :m, :clock, :natural
12
13
  ## @return [String] formatted string
13
14
  ##
14
15
  def time_string(format: :dhm)
@@ -31,28 +31,89 @@ module Doing
31
31
  and return 0
32
32
  end
33
33
 
34
+ function __fish_doing_cache_timer_expired
35
+ set -l timer __fish_doing_cache_timer_$argv[1]
36
+ if not set -q $timer
37
+ set -g $timer (date '+%s')
38
+ end
39
+
40
+ if test (math (date '+%s') - $$timer) -gt $argv[2]
41
+ set -g $timer (date '+%s')
42
+ return 1
43
+ end
44
+
45
+ return 0
46
+ end
47
+
48
+ function __fish_doing_subcommands
49
+ if not set -q __fish_doing_subcommands_cache
50
+ or __fish_doing_cache_timer_expired subcommands 86400
51
+ set -g -a __fish_doing_subcommands_cache (doing help -c)
52
+ end
53
+ printf '%s\n' $__fish_doing_subcommands_cache
54
+ end
55
+
34
56
  function __fish_doing_complete_sections
35
- doing sections -c
57
+ if not set -q __fish_doing_sections_cache
58
+ or __fish_doing_cache_timer_expired sections 3600
59
+ set -g -a __fish_doing_sections_cache (doing sections -c)
60
+ end
61
+ printf '%s\n' $__fish_doing_sections_cache
62
+ __fish_doing_complete_show_tag
36
63
  end
37
64
 
38
65
  function __fish_doing_complete_views
39
- doing views -c
66
+ if not set -q __fish_doing_views_cache
67
+ or __fish_doing_cache_timer_expired views 3600
68
+ set -g -a __fish_doing_views_cache (doing views -c)
69
+ end
70
+ printf '%s\n' $__fish_doing_views_cache
40
71
  end
41
72
 
42
- function __fish_doing_subcommands
43
- doing help -c
73
+ function __fish_doing_export_plugin
74
+ if not set -q __fish_doing_export_plugin_cache
75
+ or __fish_doing_cache_timer_expired export_plugins 3600
76
+ set -g -a __fish_doing_export_plugin_cache (doing plugins --type export -c)
77
+ end
78
+ printf '%s\n' $__fish_doing_export_plugin_cache
79
+ end
80
+
81
+ function __fish_doing_import_plugin
82
+ if not set -q __fish_doing_import_plugin_cache
83
+ or __fish_doing_cache_timer_expired import_plugins 3600
84
+ set -g -a __fish_doing_import_plugin_cache (doing plugins --type import -c)
85
+ end
86
+ printf '%s\n' $__fish_doing_import_plugin_cache
87
+ end
88
+
89
+ function __fish_doing_complete_template
90
+ if not set -q __fish_doing_template_cache
91
+ or __fish_doing_cache_timer_expired template 3600
92
+ set -g -a __fish_doing_template_cache (doing template -c)
93
+ end
94
+ printf '%s\n' $__fish_doing_template_cache
44
95
  end
45
96
 
46
- function __fish_doing_export_plugins
47
- doing plugins --type export -c
97
+ function __fish_doing_complete_tag
98
+ if not set -q __fish_doing_tag_cache
99
+ or __fish_doing_cache_timer_expired tags 60
100
+ set -g -a __fish_doing_tag_cache (doing tags)
101
+ end
102
+ printf '%s\n' $__fish_doing_tag_cache
48
103
  end
49
104
 
50
- function __fish_doing_import_plugins
51
- doing plugins --type import -c
105
+ function __fish_doing_complete_show_tag
106
+ if not set -q __fish_doing_tag_cache
107
+ or __fish_doing_cache_timer_expired tags 60
108
+ set -g -a __fish_doing_tag_cache (doing tags)
109
+ end
110
+ printf '@%s\n' $__fish_doing_tag_cache
52
111
  end
53
112
 
54
- function __fish_doing_complete_templates
55
- doing template -c
113
+ function __fish_doing_complete_args
114
+ for cmd in (doing commands_accepting -c $argv[1])
115
+ complete -x -c doing -l $argv[1] -n "__fish_doing_using_command $cmd" -a "(__fish_doing_complete_$argv[1])"
116
+ end
56
117
  end
57
118
 
58
119
  complete -c doing -f
@@ -64,6 +125,14 @@ module Doing
64
125
  complete -f -c doing -s t -l type -x -n '__fish_doing_using_command import' -a '(__fish_doing_import_plugins)'
65
126
 
66
127
  complete -xc doing -n '__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from (doing help -c)' -a "(doing help -c)"
128
+
129
+ function __fish_doing_complete_args
130
+ for cmd in (doing commands_accepting -c $argv[1])
131
+ complete -x -c doing -l $argv[1] -n "__fish_doing_using_command $cmd" -a "(__fish_doing_complete_$argv[1])"
132
+ end
133
+ end
134
+
135
+ __fish_doing_complete_args tag
67
136
  EOFUNCTIONS
68
137
  end
69
138
 
@@ -161,7 +230,7 @@ module Doing
161
230
  end
162
231
 
163
232
  unless need_export.empty?
164
- out << "complete -f -c doing -s o -l output -x -n '__fish_doing_using_command #{need_export.join(' ')}' -a '(__fish_doing_export_plugins)'"
233
+ out << "complete -f -c doing -s o -l output -x -n '__fish_doing_using_command #{need_export.join(' ')}' -a '(__fish_doing_export_plugin)'"
165
234
  end
166
235
 
167
236
  unless need_bool.empty?
@@ -30,6 +30,7 @@ module Doing
30
30
  'command_path' => File.join(Util.user_home, '.config', 'doing', 'commands')
31
31
  },
32
32
  'doing_file' => '~/.local/share/doing/what_was_i_doing.md',
33
+ 'doing_file_sort' => 'desc',
33
34
  'backup_dir' => '~/.local/share/doing/doing_backup',
34
35
  'history_size' => 15,
35
36
  'current_section' => 'Currently',
@@ -159,7 +160,7 @@ module Doing
159
160
  def choose_config(create: false)
160
161
  return @config_file if @force_answer
161
162
 
162
- if @additional_configs.count.positive? || create
163
+ if @additional_configs&.count&.positive? || create
163
164
  choices = [@config_file].concat(@additional_configs)
164
165
  choices.push('Create a new .doingrc in the current directory') if create && !File.exist?('.doingrc')
165
166
  res = Doing::Prompt.choose_from(choices.uniq.sort.reverse,