na 1.1.26 → 1.2.1

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: abe0279bc67c68bbdd675f73c87ed92eaf9fd3b3527ea6160caeff51b95fc476
4
- data.tar.gz: 355cd4c65381775e4b2fea514d855be15b557ba1961e59c272d0cddcefa172f4
3
+ metadata.gz: e7e57d75babca99bccbea082d51f20180c8089b677d2ae6a7088931b0af43fd5
4
+ data.tar.gz: 813a861742e460996b8074ce1d7603e9d3b9856a9fd2f5ed4e85e5c04fffbea0
5
5
  SHA512:
6
- metadata.gz: c434d27ed1659ce0a3879843150f17254a27ddfdb15fd1e223e826f4fdd4e45a58102fbc35cf89dfa8357c43a074eea40094b7e876ade3a2b08d95a2e1f95077
7
- data.tar.gz: 4eab4522844ca97d70f9f6daa38a03dfcffd3ecaf9a0fcdb9a3532fcead64bd918676c1cf3c9f157b16ec667b1e4b206094b84e69e51f4751f0ca986b3395fe5
6
+ metadata.gz: f80bf3d000c6fe458c807e202a9da1aa09cf6d702b896abf93c494b876597d4efe352ed9132ce9ef3a820008794e795885c67cf41ebce374f10c675c1a5c77c2
7
+ data.tar.gz: 584e5f7da19d8c5d877897b2038e14164c6d5278201da89cc6cff8d21cc0aeb29b5be560f45dffc8a65f0756d1e3ee1e9f45760fe838485d21c8fe93bb3eefdf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,57 @@
1
+ ### 1.2.1
2
+
3
+ 2022-10-22 10:18
4
+
5
+ #### NEW
6
+
7
+ - Added `--done` tag to next/find/tagged to include @done actions in the output
8
+ - Use `na changes` to view the changelog and see recent changes
9
+
10
+ #### IMPROVED
11
+
12
+ - You can run `na SAVED_SEARCH` using any saved search (same as running `na saved SAVED_SEARCH` but niftier)
13
+
14
+ ### 1.2.0
15
+
16
+ 2022-10-22 01:32
17
+
18
+ #### CHANGED
19
+
20
+ - `na add --to` now specifies a project, `--in` specifies a todo file
21
+ - Prefer fzf over gum when available
22
+
23
+ #### NEW
24
+
25
+ - `--edit` and `--delete` for saved searches (`na saved`)
26
+ - `na add --todo FILE` will match any known todo file when adding an action
27
+ - `na add --project PROJ` will match any existing project when adding an action
28
+ - `na update [options] search string` will update an existing task, moving it between projects, adding and removing tags, marking finished, setting priority, adding/replacing notes, or archiving it
29
+ - `--tagged TAG` flag for `na update` searches by tag/value
30
+ - `na projects` will list all projects in a todo file, optional argument to query known todos
31
+ - `--delete` switch for `na update`
32
+
33
+ #### IMPROVED
34
+
35
+ - Include arguments with `na edit` to narrow down which file to edit (partial matching)
36
+ - Improved handling of todo file search arguments for `na next`
37
+ - If todo file search returns zero results, loosen search
38
+ - When using !negations in todo matching, allow the negation to match any part of the path, not just last element
39
+ - Full token matching when using `na todos QUERY`
40
+ - Offer gum and readline fallbacks for fzf menu with `na update`
41
+ - `--overwrite` option when adding a note using `na update` (defaults to append)
42
+ - Allow multiple file selections for `na update`
43
+ - Display "Inbox" as a parent
44
+ - Ignore @done actions in next and tagged (unless specifically included) but allow them to appear in `na find`
45
+
46
+ #### FIXED
47
+
48
+ - `na add --priority` being interpreted as note
49
+ - Immediately save created todo files to history
50
+ - Multi-line note handling
51
+ - Project regex
52
+ - Error when an action contains a left curly brace
53
+ - Don't show @done tasks unless specifically searched for
54
+
1
55
  ### 1.1.26
2
56
 
3
57
  2022-10-15 10:36
data/Gemfile.lock CHANGED
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.1.26)
4
+ na (1.2.1)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  gli (~> 2.21.0)
7
+ mdless (~> 1.0, >= 1.0.32)
7
8
  tty-reader (~> 0.9, >= 0.9.0)
8
9
  tty-screen (~> 0.8, >= 0.8.1)
9
10
  tty-which (~> 0.5, >= 0.5.0)
@@ -13,6 +14,7 @@ GEM
13
14
  specs:
14
15
  chronic (0.10.2)
15
16
  gli (2.21.0)
17
+ mdless (1.0.32)
16
18
  minitest (5.16.3)
17
19
  rake (0.9.6)
18
20
  rdoc (4.3.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.26
12
+ The current version of `na` is 1.2.1
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,7 +59,7 @@ SYNOPSIS
59
59
  na [global options] command [command options] [arguments...]
60
60
 
61
61
  VERSION
62
- 1.1.26
62
+ 1.2.1
63
63
 
64
64
  GLOBAL OPTIONS
65
65
  -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
@@ -74,17 +74,20 @@ GLOBAL OPTIONS
74
74
  --version - Display the program version
75
75
 
76
76
  COMMANDS
77
- add - Add a new next action
78
- edit - Open a todo file in the default editor
79
- find, grep - Find actions matching a search pattern
80
- help - Shows a list of commands or help for one command
81
- init, create - Create a new todo file in the current directory
82
- initconfig - Initialize the config file using current global options
83
- next, show - Show next actions
84
- prompt - Show or install prompt hooks for the current shell
85
- saved - Execute a saved search
86
- tagged - Find actions matching a tag
87
- todos - Show list of known todo files
77
+ add - Add a new next action
78
+ changes, changelog - Display the changelog
79
+ edit - Open a todo file in the default editor
80
+ find, grep - Find actions matching a search pattern
81
+ help - Shows a list of commands or help for one command
82
+ init, create - Create a new todo file in the current directory
83
+ initconfig - Initialize the config file using current global options
84
+ next, show - Show next actions
85
+ projects - Show list of projects for a file
86
+ prompt - Show or install prompt hooks for the current shell
87
+ saved - Execute a saved search
88
+ tagged - Find actions matching a tag
89
+ todos - Show list of known todo files
90
+ update - Update an existing action
88
91
  ```
89
92
 
90
93
  #### Commands
@@ -107,13 +110,14 @@ DESCRIPTION
107
110
  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.
108
111
 
109
112
  COMMAND OPTIONS
110
- -d, --depth=DEPTH - Search for files X directories deep (default: 1)
111
- -f, --file=PATH - Specify the file to which the task should be added (default: none)
112
- -n, --note - Prompt for additional notes
113
- -p, --priority=PRIO - Add a priority level 1-5 (default: 0)
114
- -t, --tag=TAG - Use a tag other than the default next action tag (default: none)
115
- --to=PROJECT - Add action to specific project (default: Inbox)
116
- -x - Don't add next action tag to new entry
113
+ -d, --depth=DEPTH - Search for files X directories deep (default: 1)
114
+ -f, --file=PATH - Specify the file to which the task should be added (default: none)
115
+ --in, --todo=TODO_FILE - Add to a known todo file, partial matches allowed (default: none)
116
+ -n, --note - Prompt for additional notes
117
+ -p, --priority=PRIO - Add a priority level 1-5 (default: 0)
118
+ -t, --tag=TAG - Use a tag other than the default next action tag (default: none)
119
+ --to, --project, --proj=PROJECT - Add action to specific project (default: Inbox)
120
+ -x - Don't add next action tag to new entry
117
121
 
118
122
  EXAMPLES
119
123
 
@@ -174,6 +178,7 @@ DESCRIPTION
174
178
 
175
179
  COMMAND OPTIONS
176
180
  -d, --depth=DEPTH - Recurse to depth (default: none)
181
+ --[no-]done - Include @done actions
177
182
  -e, --regex - Interpret search pattern as regular expression
178
183
  --in=TODO_PATH - Show actions from a specific todo file in history. May use wildcards (* and ?) (default: none)
179
184
  -o, --or - Combine search tokens with OR, displaying actions matching ANY of the terms
@@ -231,6 +236,7 @@ DESCRIPTION
231
236
 
232
237
  COMMAND OPTIONS
233
238
  -d, --depth=DEPTH - Recurse to depth (default: 2)
239
+ --[no-]done - Include @done actions
234
240
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
235
241
  -t, --tag=TAG - Alternate tag to search for (default: none)
236
242
 
@@ -246,11 +252,67 @@ EXAMPLES
246
252
  na next marked
247
253
  ```
248
254
 
255
+ ##### projects
256
+
257
+ List all projects in a file. If arguments are provided, they're used to match a todo file from history, otherwise the todo file(s) in the current directory will be used.
258
+
259
+ ```
260
+ NAME
261
+ projects - Show list of projects for a file
262
+
263
+ SYNOPSIS
264
+
265
+ na [global options] projects [command options] [QUERY]
266
+
267
+ DESCRIPTION
268
+ Arguments will be interpreted as a query for a known todo file, fuzzy matched. Separate directories with /, :, or a space, e.g. `na projects code/marked`
269
+
270
+ COMMAND OPTIONS
271
+ -d, --depth=DEPTH - Search for files X directories deep (default: 1)
272
+ -p, --paths - Output projects as paths instead of hierarchy
273
+ ```
274
+
275
+ ##### saved
276
+
277
+ The saved command runs saved searches. To save a search, add `--save SEARCH_NAME` to a `find` or `tagged` command. The arguments provided on the command line will be saved to a search file (`/.local/share/na/saved_searches.yml`), with the search named with the SEARCH_NAME parameter. You can then run the search again with `na saved SEARCH_NAME`. Repeating the SEARCH_NAME with a new `find/tagged` command will overwrite the previous definition.
278
+
279
+ Search names can be partially matched when calling them, so if you have a search named "overdue," you can match it with `na saved over` (shortest match will be used).
280
+
281
+ Run `na saved` without an argument to list your saved searches.
282
+
283
+ ```
284
+ NAME
285
+ saved - Execute a saved search
286
+
287
+ SYNOPSIS
288
+
289
+ na [global options] saved [command options] [SEARCH_TITLE]
290
+
291
+ DESCRIPTION
292
+ Run without argument to list saved searches
293
+
294
+ COMMAND OPTIONS
295
+ -d, --[no-]delete - Delete the specified search definition
296
+ -e, --[no-]edit - Open the saved search file in $EDITOR
297
+
298
+ EXAMPLES
299
+
300
+ na saved overdue
301
+
302
+ na saved over
303
+
304
+ na saved
305
+ ```
306
+
249
307
  ##### tagged
250
308
 
251
309
  Example: `na tagged feature +maybe`.
252
310
 
253
- 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.
311
+ Separate multiple tags/value comparisons with 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.
312
+
313
+ You can also perform value comparisons on tags. A value in a TaskPaper tag is added by including it in parenthesis after the tag, e.g. `@due(2022-10-10 05:00)`. You can perform numeric comparisons with `<`, `>`, `<=`, `>=`, `==`, and `!=`. If comparing to a date, you can use natural language, e.g. `na tagged "due<today"`.
314
+
315
+ To perform a string comparison, you can use `*=` (contains), `^=` (starts with), `$=` (ends with), or `=` (matches). E.g. `na tagged "note*=video"`.
254
316
 
255
317
  ```
256
318
  NAME
@@ -265,6 +327,7 @@ DESCRIPTION
265
327
 
266
328
  COMMAND OPTIONS
267
329
  -d, --depth=DEPTH - Recurse to depth (default: 2)
330
+ --[no-]done - Include @done actions
268
331
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
269
332
  -t, --tag=TAG - Alternate tag to search for (default: none)
270
333
 
@@ -280,6 +343,81 @@ EXAMPLES
280
343
  na next marked
281
344
  ```
282
345
 
346
+ ##### todos
347
+
348
+ List all known todo files from history.
349
+
350
+ ```
351
+ NAME
352
+ todos - Show list of known todo files
353
+
354
+ SYNOPSIS
355
+
356
+ na [global options] todos [QUERY]
357
+
358
+ DESCRIPTION
359
+ Arguments will be interpreted as a query against which the list of todos will be fuzzy matched. Separate directories with /, :, or a space, e.g. `na todos code/marked`
360
+ ```
361
+
362
+ ##### update
363
+
364
+ Example: `na update --in na --archive my cool action`
365
+
366
+ The above will locate a todo file matching "na" in todo history, find any action matching "my cool action", add a dated @done tag and move it to the Archive project, creating it if needed. If multiple actions are matched, a menu is presented (multi-select if fzf is available).
367
+
368
+ This command will perform actions (tag, untag, complete, archive, add note, etc.) on existing actions by matching your search text. Arguments will be interpreted as search tokens similar to `na find`. You can use `--exact` and `--regex`, as well as wildcards in the search string. You can also use `--tagged TAG_QUERY` in addition to or instead of a search query.
369
+
370
+ You can specify a particular todo file using `--file PATH` or any todo from history using `--in QUERY`.
371
+
372
+ If more than one file is matched, a menu will be presented, multiple selections allowed. If multiple actions match the search within the selected file(s), a menu will be presented. If you have fzf installed, you can select one action to update with return, or use tab to mark multiple tasks to which the action will be applied. With gum you can use j, k, and x to mark multiple actions. Use the `--all` switch to force operation on all matched tasks, skipping the menu.
373
+
374
+ Any time an update action is carried out, a backup of the file before modification will be made in the same directory with a `~` appended to the file extension (e.g. "marked.taskpaper" is backed up to "marked.taskpaper~"). Only one undo step is available, but if something goes wrong (and this feature is still experimental, so be wary), you can just copy the "~" file back to the original.
375
+
376
+ You can specify a new project for an action (moving it) with `--proj PROJECT_PATH`. A project path is hierarchical, with each level separated by a colon or slash. If the project path provided roughly matches an existing project, e.g. "mark:bug" would match "Marked:Bugs", then that project will be used. If no match is found, na will offer to generate a new project/hierarchy for the path provided. Strings will be exact but the first letter will be uppercased.
377
+
378
+ See the help output for a list of available actions.
379
+
380
+ ```
381
+ NAME
382
+ update - Update an existing action
383
+
384
+ SYNOPSIS
385
+
386
+ na [global options] update [command options] ACTION
387
+
388
+ DESCRIPTION
389
+ Provides an easy way to complete, prioritize, and tag existing actions. If multiple todo files are found in the current directory, a menu will allow you to pick which file to act on.
390
+
391
+ COMMAND OPTIONS
392
+ -a, --archive - Add a @done tag to action and move to Archive
393
+ --all - Act on all matches immediately (no menu)
394
+ -d, --depth=DEPTH - Search for files X directories deep (default: 1)
395
+ --delete - Delete an action
396
+ -e, --regex - Interpret search pattern as regular expression
397
+ -f, --finish, --done - Add a @done tag to action
398
+ --file=PATH - Specify the file to search for the task (default: none)
399
+ --in, --todo=TODO_FILE - Use a known todo file, partial matches allowed (default: none)
400
+ -n, --note - Prompt for additional notes. Input will be appended to any existing note.
401
+ -o, --overwrite - Overwrite note instead of appending
402
+ -p, --priority=PRIO - Add/change a priority level 1-5 (default: 0)
403
+ -r, --remove=TAG - Remove a tag to the action (may be used more than once, default: none)
404
+ -t, --tag=TAG - Add a tag to the action, @tag(values) allowed (may be used more than once, default: none)
405
+ --tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
406
+ --to, --project, --proj=PROJECT - Move action to specific project (default: none)
407
+ -x, --exact - Match pattern exactly
408
+
409
+ EXAMPLES
410
+
411
+ # Find "An existing task" action and remove the @na tag from it
412
+ na update --remove na "An existing task"
413
+
414
+ # Find "A bug..." action, add @waiting, add/update @priority(4), and prompt for an additional note
415
+ na update --tag waiting "A bug I need to fix" -p 4 -n
416
+
417
+ # Add @done to "My cool action" and immediately move to Archive
418
+ na update --archive My cool action
419
+ ```
420
+
283
421
  ### Configuration
284
422
 
285
423
  Global options such as todo extension and default next action tag can be stored permanently by using the `na initconfig` command. Run na with the global options you'd like to set, and add `initconfig` at the end of the command. A file will be written to `~/.na.rc`. You can edit this manually, or just update it using the `initconfig --force` command to overwrite it with new settings.
@@ -318,11 +456,11 @@ You can add a prompt command to your shell to have na automatically list your ne
318
456
 
319
457
  After installing a hook, you'll need to close your terminal and start a new session to initialize the new commands.
320
458
 
321
-
322
459
  ### Misc
323
460
 
324
- If you have [gum][] installed, na will use it for command line input when adding tasks and notes.
461
+ If you have [gum][] installed, na will use it for command line input when adding tasks and notes. If you have [fzf][] installed, it will be used for menus, falling back to gum if available.
325
462
 
463
+ [fzf]: https://github.com/junegunn/fzf
326
464
  [gum]: https://github.com/charmbracelet/gum
327
465
  [donate]: http://brettterpstra.com/donate/
328
466
  [github]: https://github.com/ttscoff/na_gem/