na 1.1.17 → 1.1.19

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: d1f08f513ef3290991ee52c4688331b2725ddc192875bb28fea96f167da4c410
4
- data.tar.gz: 7f354ea08863cc9c1c1df2b852fc8d6eb692d9a33dbf796f43e1e4bc639a27f1
3
+ metadata.gz: 3a57cbddd075c808316dbf206b6ff65d4d0caf307c4c27524faf94f6e86517d3
4
+ data.tar.gz: 2e0ff764b2a777eb5089c228f7979c131c7669557f033f657241052cd3345b53
5
5
  SHA512:
6
- metadata.gz: b74b4c889bfd689398064a826be50599a75f7306cd45acef3abfd5704d23a284abac6b655d9344ebfcec23ec283a52b891fd3426c8cbec6c90fe2ead70665f38
7
- data.tar.gz: d960babf95647b691ecb5f16b93b7e872121c2208a79cfc2dab9be6d88479e59e8f3013697338e2dfd62f062dd1a4e07e335c46fedc41c6a1e2c440a4774a9c7
6
+ metadata.gz: 4516162349290992f0a156161e3f3b1e7831ad383c38d9061ff44d267b862037e5cfb04796ac1143c4bdd1b60fa77b6c9576ee265add84abc19a5958d30dd8a6
7
+ data.tar.gz: 91c86e3ea2c36fd66cbbc7211c9ebab460af7a9ba14668bb1f55a7a14d7e8b5aaf2ff8b7795672ee7c3856a3ae47b0783a40033c427b2df69ff2c0c6c60697e4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ### 1.1.19
2
+
3
+ 2022-10-07 03:06
4
+
5
+ #### IMPROVED
6
+
7
+ - More help updates
8
+ - Added `--or` flag to `tagged` and `find` to default to OR boolean combination of search terms/tags
9
+ - Special handling for date comparisons to "today"
10
+
11
+ ### 1.1.18
12
+
13
+ 2022-10-06 17:23
14
+
15
+ #### FIXED
16
+
17
+ - Update help to match new default AND searches
18
+
1
19
  ### 1.1.17
2
20
 
3
21
  2022-10-06 17:02
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.1.17)
4
+ na (1.1.19)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  gli (~> 2.21.0)
7
7
  tty-reader (~> 0.9, >= 0.9.0)
data/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 1.1.17
12
+ The current version of `na` is 1.1.19
13
13
  .
14
14
 
15
15
  `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.
@@ -59,24 +59,24 @@ SYNOPSIS
59
59
  na [global options] command [command options] [arguments...]
60
60
 
61
61
  VERSION
62
- 1.1.1
62
+ 1.1.19
63
63
 
64
64
  GLOBAL OPTIONS
65
65
  -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
66
66
  -d, --depth=DEPTH - Recurse to depth (default: 1)
67
67
  --[no-]debug - Display verbose output
68
- --ext=FILE_EXTENSION - File extension to consider a todo file (default: taskpaper)
68
+ --ext=EXT - File extension to consider a todo file (default: taskpaper)
69
69
  --help - Show this message
70
- -n, --[no-]note - Prompt for additional notes (deprecated, for backwards compatibility)
71
- --na_tag=TAG - Tag to consider a next action (default: na)
70
+ -n, --note - Prompt for additional notes (deprecated, for backwards compatibility)
72
71
  -p, --priority=PRIORITY - Set a priority 0-5 (deprecated, for backwards compatibility) (default: none)
73
- -r, --[no-]recurse - Recurse 3 directories deep (deprecated, for backwards compatability) (default: enabled)
72
+ -r, --[no-]recurse - Recurse 3 directories deep (deprecated, for backwards compatability)
73
+ -t, --na_tag=TAG - Tag to consider a next action (default: na)
74
74
  --version - Display the program version
75
75
 
76
76
  COMMANDS
77
77
  add - Add a new next action
78
78
  edit - Open a todo file in the default editor
79
- find - Find actions matching a search pattern
79
+ find, grep - Find actions matching a search pattern
80
80
  help - Shows a list of commands or help for one command
81
81
  init, create - Create a new todo file in the current directory
82
82
  initconfig - Initialize the config file using current global options
@@ -99,17 +99,19 @@ NAME
99
99
 
100
100
  SYNOPSIS
101
101
 
102
- na [global options] add [command options] TASK
102
+ na [global options] add [command options] ACTION
103
103
 
104
104
  DESCRIPTION
105
105
  Provides an easy way to store todos while you work. Add quick reminders and (if you set up Prompt Hooks) they'll automatically display next time you enter the directory. If multiple todo files are found in the current directory, a menu will allow you to pick to which file the action gets added.
106
106
 
107
107
  COMMAND OPTIONS
108
- -f, --file=PATH - Specify the file to which the task should be added (default: none)
109
- -n, --note - Prompt for additional notes
110
- -p, --priority=arg - Add a priority level 1-5 (default: 0)
111
- -t, --tag=TAG - Use a tag other than the default next action tag (default: none)
112
- -x - Don't add next action tag to new entry
108
+ -d, --depth=DEPTH - Search for files X directories deep (default: 1)
109
+ -f, --file=PATH - Specify the file to which the task should be added (default: none)
110
+ -n, --note - Prompt for additional notes
111
+ -p, --priority=PRIO - Add a priority level 1-5 (default: 0)
112
+ -t, --tag=TAG - Use a tag other than the default next action tag (default: none)
113
+ --to=PROJECT - Add action to specific project (default: Inbox)
114
+ -x - Don't add next action tag to new entry
113
115
 
114
116
  EXAMPLES
115
117
 
@@ -152,7 +154,7 @@ EXAMPLES
152
154
 
153
155
  Example: `na find cool feature idea`
154
156
 
155
- Unless `--exact` is specified, search is tokenized and combined with OR, so `na find cool feature idea` translates to `cool OR feature OR idea`, matching any string that contains any of the words. To make a token required, add a `+` before it (e.g. `cool +feature idea` is `(cool OR idea) AND feature`). Wildcards allowed (`*` and `?`), use `--regex` to interpret the search as a regular expression. Use `-v` to invert the results (display non-matching actions only).
157
+ Unless `--exact` is specified, search is tokenized and combined with AND, so `na find cool feature idea` translates to `cool AND feature AND idea`, matching any string that contains all of the words. To make a token required and others optional, add a `+` before it (e.g. `cool +feature idea` is `(cool OR idea) AND feature`). Wildcards allowed (`*` and `?`), use `--regex` to interpret the search as a regular expression. Use `-v` to invert the results (display non-matching actions only).
156
158
 
157
159
  ```
158
160
  NAME
@@ -163,22 +165,24 @@ SYNOPSIS
163
165
  na [global options] find [command options] PATTERN
164
166
 
165
167
  DESCRIPTION
166
- Search tokens are separated by spaces. Actions matching any token in the pattern will be shown (partial matches allowed). Add a + before a token to make it required, e.g. `na find +feature +maybe`
168
+ Search tokens are separated by spaces. Actions matching all tokens in the pattern will be shown (partial matches allowed). Add a + before a token to make it required, e.g. `na find +feature +maybe`
167
169
 
168
170
  COMMAND OPTIONS
169
- -d, --depth=DEPTH - Recurse to depth (default: 1)
170
- -x, --exact - Match pattern exactly
171
+ -d, --depth=DEPTH - Recurse to depth (default: none)
172
+ -e, --regex - Interpret search pattern as regular expression
173
+ --in=TODO_PATH - Show actions from a specific todo file in history (default: none)
174
+ -o, --or - Combine search tokens with OR, displaying actions matching ANY of the terms
175
+ --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
176
+ -v, --invert - Show actions not matching search pattern
177
+ -x, --exact - Match pattern exactly
171
178
 
172
179
  EXAMPLES
173
180
 
174
181
  # Find all actions containing feature, idea, and swift
175
- na find feature +idea +swift
182
+ na find feature idea swift
176
183
 
177
184
  # Find all actions containing the exact text "feature idea"
178
185
  na find -x feature idea
179
-
180
- # Find all actions 3 directories deep containing either swift or obj-c
181
- na find -d 3 swift obj-c
182
186
  ```
183
187
 
184
188
  ##### init, create
@@ -217,23 +221,27 @@ SYNOPSIS
217
221
  na [global options] next [command options] OPTIONAL_QUERY
218
222
 
219
223
  COMMAND OPTIONS
220
- -d, --depth=DEPTH - Recurse to depth (default: none)
221
- -t, --tag=arg - Alternate tag to search for (default: na)
224
+ -d, --depth=DEPTH - Recurse to depth (default: 2)
225
+ --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
226
+ -t, --tag=TAG - Alternate tag to search for (default: none)
222
227
 
223
228
  EXAMPLES
224
229
 
225
230
  # display the next actions from any todo files in the current directory
226
- doing next
231
+ na next
232
+
233
+ # display the next actions from the current directory, traversing 3 levels deep
234
+ na next -d 3
227
235
 
228
- # display the next actions from the current directory and its children, 3 levels deep
229
- doing next -d 3
236
+ # display next actions for a project you visited in the past
237
+ na next marked
230
238
  ```
231
239
 
232
240
  ##### tagged
233
241
 
234
242
  Example: `na tagged feature +maybe`.
235
243
 
236
- Separate multiple tags with spaces or commas. By default tags are combined with OR, so actions matching any of the tags listed will be displayed. Use `+` to make a tag required and `!` to negate a tag (only display if the action does _not_ contain the tag). Use `-v` to invert the search and display all actions that _don't_ match.
244
+ Separate multiple tags with spaces or commas. By default tags are combined with AND, so actions matching all of the tags listed will be displayed. Use `+` to make a tag required and `!` to negate a tag (only display if the action does _not_ contain the tag). When `+` and/or `!` are used, undecorated tokens become optional matches. Use `-v` to invert the search and display all actions that _don't_ match.
237
245
 
238
246
  ```
239
247
  NAME
@@ -244,18 +252,31 @@ SYNOPSIS
244
252
  na [global options] tagged [command options] TAG [VALUE]
245
253
 
246
254
  DESCRIPTION
247
- Finds actions with tags matching the arguments. An action is shown if it contains any of the tags listed. Add a + before a tag to make it required, e.g. `na tagged feature +maybe`
255
+ Finds actions with tags matching the arguments. An action is shown if it contains all of the tags listed. Add a + before a tag to make it required and others optional. You can specify values using TAG=VALUE pairs. Use <, >, and = for numeric comparisons, and *=, ^=, and $= for text comparisons. Date comparisons use natural language (`na tagged "due<=today"`) and are detected automatically.
248
256
 
249
257
  COMMAND OPTIONS
250
- -d, --depth=DEPTH - Recurse to depth (default: 1)
258
+ -d, --depth=DEPTH - Recurse to depth (default: 1)
259
+ --in=TODO_PATH - Show actions from a specific todo file in history (default: none)
260
+ -o, --or - Combine tags with OR, displaying actions matching ANY of the tags
261
+ --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
262
+ -v, --invert - Show actions not matching tags
251
263
 
252
264
  EXAMPLES
253
265
 
254
266
  # Show all actions tagged @maybe
255
- na tagged +maybe
267
+ na tagged maybe
268
+
269
+ # Show all actions tagged @feature AND @idea, recurse 3 levels
270
+ na tagged -d 3 "feature, idea"
271
+
272
+ # Show all actions tagged @feature OR @idea
273
+ na tagged --or "feature, idea"
274
+
275
+ # Show actions with @priority(4) or @priority(5)
276
+ na tagged "priority>=4"
256
277
 
257
- # Show all actions tagged either @feature or @idea, recurse 3 levels
258
- na tagged -d 3 feature idea
278
+ # Show actions with a due date coming up in the next 2 days
279
+ na tagged "due<in 2 days"
259
280
  ```
260
281
 
261
282
  ### Configuration
data/bin/na CHANGED
@@ -119,7 +119,7 @@ class App
119
119
 
120
120
  If multiple todo files are found in the current directory, a menu will allow you to pick to which
121
121
  file the action gets added.'
122
- arg_name 'TASK'
122
+ arg_name 'ACTION'
123
123
  command :add do |c|
124
124
  c.example 'na add "A cool feature I thought of @idea"', desc: 'Add a new action to the Inbox, including a tag'
125
125
  c.example 'na add "A bug I need to fix" -p 4 -n',
@@ -231,13 +231,12 @@ class App
231
231
  end
232
232
 
233
233
  desc 'Find actions matching a search pattern'
234
- long_desc 'Search tokens are separated by spaces. Actions matching any token in the pattern will be shown
234
+ long_desc 'Search tokens are separated by spaces. Actions matching all tokens in the pattern will be shown
235
235
  (partial matches allowed). Add a + before a token to make it required, e.g. `na find +feature +maybe`'
236
236
  arg_name 'PATTERN'
237
237
  command %i[find grep] do |c|
238
- c.example 'na find feature +idea +swift', desc: 'Find all actions containing feature, idea, and swift'
238
+ c.example 'na find feature idea swift', desc: 'Find all actions containing feature, idea, and swift'
239
239
  c.example 'na find -x feature idea', desc: 'Find all actions containing the exact text "feature idea"'
240
- c.example 'na find -d 3 swift obj-c', desc: 'Find all actions 3 directories deep containing either swift or obj-c'
241
240
 
242
241
  c.desc 'Interpret search pattern as regular expression'
243
242
  c.switch %i[e regex], negatable: false
@@ -253,6 +252,9 @@ class App
253
252
  c.arg_name 'TODO_PATH'
254
253
  c.flag %i[in]
255
254
 
255
+ c.desc 'Combine search tokens with OR, displaying actions matching ANY of the terms'
256
+ c.switch %i[o or], negatable: false
257
+
256
258
  c.desc 'Show actions from a specific project'
257
259
  c.arg_name 'PROJECT[/SUBPROJECT]'
258
260
  c.flag %i[proj project]
@@ -273,7 +275,7 @@ class App
273
275
  tokens = Regexp.new(args.join(' '), Regexp::IGNORECASE)
274
276
  else
275
277
  tokens = []
276
- all_req = args.join(' ') !~ /[+!\-]/
278
+ all_req = args.join(' ') !~ /[+!\-]/ && !options[:or]
277
279
 
278
280
  args.join(' ').split(/ /).each do |arg|
279
281
  m = arg.match(/^(?<req>[+\-!])?(?<tok>.*?)$/)
@@ -312,13 +314,18 @@ class App
312
314
 
313
315
  desc 'Find actions matching a tag'
314
316
  long_desc 'Finds actions with tags matching the arguments. An action is shown if it
315
- contains any of the tags listed. Add a + before a tag to make it required.
316
- You can specify values using TAG=VALUE pairs.'
317
+ contains all of the tags listed. Add a + before a tag to make it required
318
+ and others optional. You can specify values using TAG=VALUE pairs.
319
+ Use <, >, and = for numeric comparisons, and *=, ^=, and $= for text comparisons.
320
+ Date comparisons use natural language (`na tagged "due<=today"`) and
321
+ are detected automatically.'
317
322
  arg_name 'TAG [VALUE]'
318
323
  command %i[tagged] do |c|
319
- c.example 'na tagged +maybe', desc: 'Show all actions tagged @maybe'
320
- c.example 'na tagged -d 3 feature idea', desc: 'Show all actions tagged either @feature or @idea, recurse 3 levels'
321
- c.example 'na tagged +priority=5', desc: 'Show actions with @priority(5)'
324
+ c.example 'na tagged maybe', desc: 'Show all actions tagged @maybe'
325
+ c.example 'na tagged -d 3 "feature, idea"', desc: 'Show all actions tagged @feature AND @idea, recurse 3 levels'
326
+ c.example 'na tagged --or "feature, idea"', desc: 'Show all actions tagged @feature OR @idea'
327
+ c.example 'na tagged "priority>=4"', desc: 'Show actions with @priority(4) or @priority(5)'
328
+ c.example 'na tagged "due<in 2 days"', desc: 'Show actions with a due date coming up in the next 2 days'
322
329
 
323
330
  c.desc 'Recurse to depth'
324
331
  c.arg_name 'DEPTH'
@@ -329,6 +336,9 @@ class App
329
336
  c.arg_name 'TODO_PATH'
330
337
  c.flag %i[in]
331
338
 
339
+ c.desc 'Combine tags with OR, displaying actions matching ANY of the tags'
340
+ c.switch %i[o or], negatable: false
341
+
332
342
  c.desc 'Show actions from a specific project'
333
343
  c.arg_name 'PROJECT[/SUBPROJECT]'
334
344
  c.flag %i[proj project]
@@ -345,7 +355,7 @@ class App
345
355
 
346
356
  tags = []
347
357
 
348
- all_req = args.join(' ') !~ /[+!\-]/
358
+ all_req = args.join(' ') !~ /[+!\-]/ && !options[:or]
349
359
  args.join(',').split(/ *, */).each do |arg|
350
360
  # TODO: <> comparisons do nothing right now
351
361
  m = arg.match(/^(?<req>[+\-!])?(?<tag>[^ =<>*$\^]+)(?:(?<op>[=<>*$\^]+)(?<val>.*?))?$/)
data/lib/na/action.rb CHANGED
@@ -137,6 +137,11 @@ module NA
137
137
  return false if tag_val.nil?
138
138
 
139
139
  begin
140
+ if val =~ /^today$/i
141
+ val = 'today at 12am'
142
+ tag_val = tag_val.sub(/\d\d:\d\d/, '00:00')
143
+ end
144
+
140
145
  tag_date = Time.parse(tag_val)
141
146
  date = Chronic.parse(val)
142
147
 
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.1.17'
2
+ VERSION = '1.1.19'
3
3
  end
data/scripts/fixreadme.rb CHANGED
@@ -13,6 +13,11 @@ content.gsub!(/<!--VER-->(.*?)<!--END VER-->/, current_ver)
13
13
  content.gsub!(/<!--GITHUB-->(.*?)<!--END GITHUB-->/m, '\1')
14
14
  content.gsub!(/<!--JEKYLL(.*?)-->/m, '')
15
15
 
16
+ content.gsub!(/^@cli\((.*?)\)/) do
17
+ cmd = Regexp.last_match(1)
18
+ `#{cmd}`.strip.gsub(/\n{2,}/, "\n\n")
19
+ end
20
+
16
21
  File.open(dest, 'w') { |f| f.puts(content) }
17
22
 
18
23
  Process.exit 0
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.1.16<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.1.18<!--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
 
@@ -51,37 +51,7 @@ If found, it will try to locate an `Inbox:` project, or create one if it doesn't
51
51
  ### Usage
52
52
 
53
53
  ```
54
- NAME
55
- na - Add and list next actions for the current project
56
-
57
- SYNOPSIS
58
- na [global options] command [command options] [arguments...]
59
-
60
- VERSION
61
- 1.1.1
62
-
63
- GLOBAL OPTIONS
64
- -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
65
- -d, --depth=DEPTH - Recurse to depth (default: 1)
66
- --[no-]debug - Display verbose output
67
- --ext=FILE_EXTENSION - File extension to consider a todo file (default: taskpaper)
68
- --help - Show this message
69
- -n, --[no-]note - Prompt for additional notes (deprecated, for backwards compatibility)
70
- --na_tag=TAG - Tag to consider a next action (default: na)
71
- -p, --priority=PRIORITY - Set a priority 0-5 (deprecated, for backwards compatibility) (default: none)
72
- -r, --[no-]recurse - Recurse 3 directories deep (deprecated, for backwards compatability) (default: enabled)
73
- --version - Display the program version
74
-
75
- COMMANDS
76
- add - Add a new next action
77
- edit - Open a todo file in the default editor
78
- find - Find actions matching a search pattern
79
- help - Shows a list of commands or help for one command
80
- init, create - Create a new todo file in the current directory
81
- initconfig - Initialize the config file using current global options
82
- next, show - Show next actions
83
- prompt - Show or install prompt hooks for the current shell
84
- tagged - Find actions matching a tag
54
+ @cli(bundle exec bin/na help)
85
55
  ```
86
56
 
87
57
  #### Commands
@@ -93,110 +63,29 @@ Example: `na add This feature @idea I have`
93
63
  If you run the `add` command with no arguments, you'll be asked for input on the command line.
94
64
 
95
65
  ```
96
- NAME
97
- add - Add a new next action
98
-
99
- SYNOPSIS
100
-
101
- na [global options] add [command options] TASK
102
-
103
- DESCRIPTION
104
- Provides an easy way to store todos while you work. Add quick reminders and (if you set up Prompt Hooks) they'll automatically display next time you enter the directory. If multiple todo files are found in the current directory, a menu will allow you to pick to which file the action gets added.
105
-
106
- COMMAND OPTIONS
107
- -f, --file=PATH - Specify the file to which the task should be added (default: none)
108
- -n, --note - Prompt for additional notes
109
- -p, --priority=arg - Add a priority level 1-5 (default: 0)
110
- -t, --tag=TAG - Use a tag other than the default next action tag (default: none)
111
- -x - Don't add next action tag to new entry
112
-
113
- EXAMPLES
114
-
115
- # Add a new action to the Inbox, including a tag
116
- na add "A cool feature I thought of @idea"
117
-
118
- # Add a new action to the Inbox, set its @priority to 4, and prompt for an additional note
119
- na add "A bug I need to fix" -p 4 -n
66
+ @cli(bundle exec bin/na help add)
120
67
  ```
121
68
 
122
69
  ##### edit
123
70
 
124
71
  ```
125
- NAME
126
- edit - Open a todo file in the default editor
127
-
128
- SYNOPSIS
129
-
130
- na [global options] edit [command options]
131
-
132
- DESCRIPTION
133
- Let the system choose the defualt, (e.g. TaskPaper), or specify a command line utility (e.g. vim). If more than one todo file is found, a menu is displayed.
134
-
135
- COMMAND OPTIONS
136
- -a, --app=EDITOR - Specify a Mac app (default: none)
137
- -d, --depth=DEPTH - Recurse to depth (default: 1)
138
- -e, --editor=EDITOR - Specify an editor CLI (default: none)
139
-
140
- EXAMPLES
141
-
142
- # Open the main todo file in the default editor
143
- na edit
144
-
145
- # Display a menu of all todo files three levels deep from the
146
- current directory, open selection in vim.
147
- na edit -d 3 -a vim
72
+ @cli(bundle exec bin/na help edit)
148
73
  ```
149
74
 
150
75
  ##### find
151
76
 
152
77
  Example: `na find cool feature idea`
153
78
 
154
- Unless `--exact` is specified, search is tokenized and combined with OR, so `na find cool feature idea` translates to `cool OR feature OR idea`, matching any string that contains any of the words. To make a token required, add a `+` before it (e.g. `cool +feature idea` is `(cool OR idea) AND feature`). Wildcards allowed (`*` and `?`), use `--regex` to interpret the search as a regular expression. Use `-v` to invert the results (display non-matching actions only).
79
+ Unless `--exact` is specified, search is tokenized and combined with AND, so `na find cool feature idea` translates to `cool AND feature AND idea`, matching any string that contains all of the words. To make a token required and others optional, add a `+` before it (e.g. `cool +feature idea` is `(cool OR idea) AND feature`). Wildcards allowed (`*` and `?`), use `--regex` to interpret the search as a regular expression. Use `-v` to invert the results (display non-matching actions only).
155
80
 
156
81
  ```
157
- NAME
158
- find - Find actions matching a search pattern
159
-
160
- SYNOPSIS
161
-
162
- na [global options] find [command options] PATTERN
163
-
164
- DESCRIPTION
165
- Search tokens are separated by spaces. Actions matching any token in the pattern will be shown (partial matches allowed). Add a + before a token to make it required, e.g. `na find +feature +maybe`
166
-
167
- COMMAND OPTIONS
168
- -d, --depth=DEPTH - Recurse to depth (default: 1)
169
- -x, --exact - Match pattern exactly
170
-
171
- EXAMPLES
172
-
173
- # Find all actions containing feature, idea, and swift
174
- na find feature +idea +swift
175
-
176
- # Find all actions containing the exact text "feature idea"
177
- na find -x feature idea
178
-
179
- # Find all actions 3 directories deep containing either swift or obj-c
180
- na find -d 3 swift obj-c
82
+ @cli(bundle exec bin/na help find)
181
83
  ```
182
84
 
183
85
  ##### init, create
184
86
 
185
87
  ```
186
- NAME
187
- init - Create a new todo file in the current directory
188
-
189
- SYNOPSIS
190
-
191
- na [global options] init [PROJECT]
192
-
193
- EXAMPLES
194
-
195
- # Generate a new todo file, prompting for project name
196
- na init
197
-
198
- # Generate a new todo for a project called warpspeed
199
- na init warpspeed
88
+ @cli(bundle exec bin/na help init)
200
89
  ```
201
90
 
202
91
  ##### next, show
@@ -208,53 +97,17 @@ Examples:
208
97
  - `na show marked2` (show next actions from another directory you've previously used na on)
209
98
 
210
99
  ```
211
- NAME
212
- next - Show next actions
213
-
214
- SYNOPSIS
215
-
216
- na [global options] next [command options] OPTIONAL_QUERY
217
-
218
- COMMAND OPTIONS
219
- -d, --depth=DEPTH - Recurse to depth (default: none)
220
- -t, --tag=arg - Alternate tag to search for (default: na)
221
-
222
- EXAMPLES
223
-
224
- # display the next actions from any todo files in the current directory
225
- doing next
226
-
227
- # display the next actions from the current directory and its children, 3 levels deep
228
- doing next -d 3
100
+ @cli(bundle exec bin/na help next)
229
101
  ```
230
102
 
231
103
  ##### tagged
232
104
 
233
105
  Example: `na tagged feature +maybe`.
234
106
 
235
- Separate multiple tags with spaces or commas. By default tags are combined with OR, so actions matching any of the tags listed will be displayed. Use `+` to make a tag required and `!` to negate a tag (only display if the action does _not_ contain the tag). Use `-v` to invert the search and display all actions that _don't_ match.
107
+ Separate multiple tags with spaces or commas. By default tags are combined with AND, so actions matching all of the tags listed will be displayed. Use `+` to make a tag required and `!` to negate a tag (only display if the action does _not_ contain the tag). When `+` and/or `!` are used, undecorated tokens become optional matches. Use `-v` to invert the search and display all actions that _don't_ match.
236
108
 
237
109
  ```
238
- NAME
239
- tagged - Find actions matching a tag
240
-
241
- SYNOPSIS
242
-
243
- na [global options] tagged [command options] TAG [VALUE]
244
-
245
- DESCRIPTION
246
- Finds actions with tags matching the arguments. An action is shown if it contains any of the tags listed. Add a + before a tag to make it required, e.g. `na tagged feature +maybe`
247
-
248
- COMMAND OPTIONS
249
- -d, --depth=DEPTH - Recurse to depth (default: 1)
250
-
251
- EXAMPLES
252
-
253
- # Show all actions tagged @maybe
254
- na tagged +maybe
255
-
256
- # Show all actions tagged either @feature or @idea, recurse 3 levels
257
- na tagged -d 3 feature idea
110
+ @cli(bundle exec bin/na help tagged)
258
111
  ```
259
112
 
260
113
  ### Configuration
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.1.17
4
+ version: 1.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-06 00:00:00.000000000 Z
11
+ date: 2022-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake