na 1.2.20 → 1.2.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20a02c7a0e5644aa0aef147e434a8d6dc9daa1705a50e9563255a7c2f6688267
4
- data.tar.gz: a097a253c572eb83c2fd74b6ba978fbbe5f328d804cdd309af6a6e66e682d384
3
+ metadata.gz: 652b91a5481fa62e1bb36ae71256a38d3081ee43999c167d1f35dc5ebc1e8261
4
+ data.tar.gz: 0deae6f4ade63260609e22b2aa0b7b8b2a668a77e487292b082c856c9a633f92
5
5
  SHA512:
6
- metadata.gz: 33c341298f6c7855dce8541f185aa46bf2d7d08cb5f97d709fda5fe1e0cf1537cec96297c80a88b1e69fb9089c7d15219d943dc4704a3fcca60be58b0e430ff6
7
- data.tar.gz: 3c000719d4b5d7d2f6713c1865cdcc713878eac017379e40fffc98199843abbb23c4517b0a621ed80ae1b7d8a11d35633f820c48c38c8261ff833d39e23ae675
6
+ metadata.gz: d3f1cb74ed04440ae3f8b95d70f2ad1dbc263d57b539e6a00b0984c46b008a6567008ed8098506b1ab6c9a2d2aa2c040cb15b1ebebd1794e3d3a4a5bd375f733
7
+ data.tar.gz: 30164f4a176f01b4978abaf7b5c3b3489925e535935802c5c0ce56947fb5baf96a36b9f05081073479cd3710a6b922bed698f2458644a99a270adf2b7781a1e3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.20)
4
+ na (1.2.21)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  gli (~> 2.21.0)
7
7
  mdless (~> 1.0, >= 1.0.32)
data/README.md CHANGED
@@ -77,11 +77,12 @@ SYNOPSIS
77
77
  na [global options] command [command options] [arguments...]
78
78
 
79
79
  VERSION
80
- 1.2.20
80
+ 1.2.21
81
81
 
82
82
  GLOBAL OPTIONS
83
- -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
83
+ -a, --add - Add a next action (deprecated, for backwards compatibility)
84
84
  --add_at=POSITION - Add all new/moved entries at [s]tart or [e]nd of target project (default: start)
85
+ --[no-]color - Colorize output (default: enabled)
85
86
  --cwd_as=TYPE - Use current working directory as [p]roject, [t]ag, or [n]one (default: none)
86
87
  -d, --depth=DEPTH - Recurse to depth (default: 3)
87
88
  --[no-]debug - Display verbose output
@@ -210,10 +211,10 @@ COMMAND OPTIONS
210
211
  --[no-]done - Include @done actions
211
212
  -e, --regex - Interpret search pattern as regular expression
212
213
  --in=TODO_PATH - Show actions from a specific todo file in history. May use wildcards (* and ?) (default: none)
213
- --[no-]nest - Output actions nested by file
214
+ --nest - Output actions nested by file
214
215
  --[no-]notes - Include notes in output
215
216
  -o, --or - Combine search tokens with OR, displaying actions matching ANY of the terms
216
- --[no-]omnifocus - Output actions nested by file and project
217
+ --omnifocus - Output actions nested by file and project
217
218
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
218
219
  --save=TITLE - Save this search for future use (default: none)
219
220
  --tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
@@ -272,13 +273,13 @@ DESCRIPTION
272
273
  COMMAND OPTIONS
273
274
  -d, --depth=DEPTH - Recurse to depth (default: none)
274
275
  --[no-]done - Include @done actions
275
- --[no-]exact - Search query is exact text match (not tokens)
276
+ --exact - Search query is exact text match (not tokens)
276
277
  --in, --todo=TODO_FILE - Display matches from a known todo file (may be used more than once, default: none)
277
- --[no-]nest - Output actions nested by file
278
+ --nest - Output actions nested by file
278
279
  --[no-]notes - Include notes in output
279
- --[no-]omnifocus - Output actions nested by file and project
280
+ --omnifocus - Output actions nested by file and project
280
281
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
281
- --[no-]regex - Search query is regular expression
282
+ --regex - Search query is regular expression
282
283
  --search=QUERY - Filter results using search terms (may be used more than once, default: none)
283
284
  -t, --tag=TAG - Alternate tag to search for (default: none)
284
285
  --tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
@@ -338,8 +339,8 @@ DESCRIPTION
338
339
  Run without argument to list saved searches
339
340
 
340
341
  COMMAND OPTIONS
341
- -d, --[no-]delete - Delete the specified search definition
342
- -e, --[no-]edit - Open the saved search file in $EDITOR
342
+ -d, --delete - Delete the specified search definition
343
+ -e, --edit - Open the saved search file in $EDITOR
343
344
 
344
345
  EXAMPLES
345
346
 
@@ -378,13 +379,13 @@ DESCRIPTION
378
379
  COMMAND OPTIONS
379
380
  -d, --depth=DEPTH - Recurse to depth (default: none)
380
381
  --[no-]done - Include @done actions
381
- --[no-]exact - Search query is exact text match (not tokens)
382
+ --exact - Search query is exact text match (not tokens)
382
383
  --in, --todo=TODO_FILE - Display matches from a known todo file (may be used more than once, default: none)
383
- --[no-]nest - Output actions nested by file
384
+ --nest - Output actions nested by file
384
385
  --[no-]notes - Include notes in output
385
- --[no-]omnifocus - Output actions nested by file and project
386
+ --omnifocus - Output actions nested by file and project
386
387
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
387
- --[no-]regex - Search query is regular expression
388
+ --regex - Search query is regular expression
388
389
  --search=QUERY - Filter results using search terms (may be used more than once, default: none)
389
390
  -t, --tag=TAG - Alternate tag to search for (default: none)
390
391
  --tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
data/bin/na CHANGED
@@ -34,7 +34,10 @@ class App
34
34
  NA::Color.coloring = $stdin.isatty
35
35
 
36
36
  desc 'Add a next action (deprecated, for backwards compatibility)'
37
- switch %i[a add]
37
+ switch %i[a add], negatable: false
38
+
39
+ desc 'Colorize output'
40
+ switch %i[color], negatable: true, default_value: true
38
41
 
39
42
  desc 'Set a priority 0-5 (deprecated, for backwards compatibility)'
40
43
  arg_name 'PRIORITY'
@@ -104,10 +107,10 @@ class App
104
107
  c.flag %i[search], multiple: true
105
108
 
106
109
  c.desc 'Search query is regular expression'
107
- c.switch %i[regex]
110
+ c.switch %i[regex], negatable: false
108
111
 
109
112
  c.desc 'Search query is exact text match (not tokens)'
110
- c.switch %i[exact]
113
+ c.switch %i[exact], negatable: false
111
114
 
112
115
  c.desc 'Include notes in output'
113
116
  c.switch %i[notes], negatable: true, default_value: false
@@ -116,10 +119,10 @@ class App
116
119
  c.switch %i[done]
117
120
 
118
121
  c.desc 'Output actions nested by file'
119
- c.switch %[nest]
122
+ c.switch %[nest], negatable: false
120
123
 
121
124
  c.desc 'Output actions nested by file and project'
122
- c.switch %[omnifocus]
125
+ c.switch %[omnifocus], negatable: false
123
126
 
124
127
  c.action do |global_options, options, args|
125
128
  if global_options[:add]
@@ -248,7 +251,7 @@ class App
248
251
  c.flag %i[t tag]
249
252
 
250
253
  c.desc 'Don\'t add next action tag to new entry'
251
- c.switch %i[x]
254
+ c.switch %i[x], negatable: false
252
255
 
253
256
  c.desc 'Specify the file to which the task should be added'
254
257
  c.arg_name 'PATH'
@@ -661,10 +664,10 @@ class App
661
664
  c.flag %i[save]
662
665
 
663
666
  c.desc 'Output actions nested by file'
664
- c.switch %[nest]
667
+ c.switch %[nest], negatable: false
665
668
 
666
669
  c.desc 'Output actions nested by file and project'
667
- c.switch %[omnifocus]
670
+ c.switch %[omnifocus], negatable: false
668
671
 
669
672
  c.action do |global_options, options, args|
670
673
  options[:nest] = true if options[:omnifocus]
@@ -785,10 +788,10 @@ class App
785
788
  c.flag %i[search], multiple: true
786
789
 
787
790
  c.desc 'Search query is regular expression'
788
- c.switch %i[regex]
791
+ c.switch %i[regex], negatable: false
789
792
 
790
793
  c.desc 'Search query is exact text match (not tokens)'
791
- c.switch %i[exact]
794
+ c.switch %i[exact], negatable: false
792
795
 
793
796
  c.desc 'Include @done actions'
794
797
  c.switch %i[done]
@@ -801,10 +804,10 @@ class App
801
804
  c.flag %i[save]
802
805
 
803
806
  c.desc 'Output actions nested by file'
804
- c.switch %[nest]
807
+ c.switch %[nest], negatable: false
805
808
 
806
809
  c.desc 'Output actions nested by file and project'
807
- c.switch %[omnifocus]
810
+ c.switch %[omnifocus], negatable: false
808
811
 
809
812
  c.action do |global_options, options, args|
810
813
  options[:nest] = true if options[:omnifocus]
@@ -1101,10 +1104,10 @@ class App
1101
1104
  c.example 'na saved', description: 'list available searches'
1102
1105
 
1103
1106
  c.desc 'Open the saved search file in $EDITOR'
1104
- c.switch %i[e edit]
1107
+ c.switch %i[e edit], negatable: false
1105
1108
 
1106
1109
  c.desc 'Delete the specified search definition'
1107
- c.switch %i[d delete]
1110
+ c.switch %i[d delete], negatable: false
1108
1111
 
1109
1112
  c.action do |_global_options, options, args|
1110
1113
  NA.edit_searches if options[:edit]
@@ -1128,6 +1131,7 @@ class App
1128
1131
 
1129
1132
  pre do |global, _command, _options, _args|
1130
1133
  NA.verbose = global[:debug]
1134
+ NA::Color.coloring = global[:color]
1131
1135
  NA.extension = global[:ext]
1132
1136
  NA.na_tag = global[:na_tag]
1133
1137
  NA.global_file = global[:file]
data/lib/na/colors.rb CHANGED
@@ -226,6 +226,7 @@ module NA
226
226
  ##
227
227
  def template(input)
228
228
  input = input.join(' ') if input.is_a? Array
229
+ return input.gsub(/(?<!\\)\{(\w+)\}/i, '') unless NA::Color.coloring?
229
230
 
230
231
  fmt = input.gsub(/%/, '%%')
231
232
  fmt = fmt.gsub(/(?<!\\)\{(\w+)\}/i) do
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.20'
2
+ VERSION = '1.2.21'
3
3
  end
data/src/_README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  _If you're one of the rare people like me who find this useful, feel free to
10
10
  [buy me some coffee][donate]._
11
11
 
12
- The current version of `na` is <!--VER-->1.2.19<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.20<!--END VER-->.
13
13
 
14
14
  `na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: na
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.20
4
+ version: 1.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-09 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake