na 1.1.26 → 1.2.0

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: e91f1eeef1caa7f05d1dab98bd221d88d58ad1a0d928c88a399f8b1a491a200c
4
+ data.tar.gz: b08a5c6a2cfe97f0749e784e3a5d9a06ef458ce06162f0f62321d775069bce87
5
5
  SHA512:
6
- metadata.gz: c434d27ed1659ce0a3879843150f17254a27ddfdb15fd1e223e826f4fdd4e45a58102fbc35cf89dfa8357c43a074eea40094b7e876ade3a2b08d95a2e1f95077
7
- data.tar.gz: 4eab4522844ca97d70f9f6daa38a03dfcffd3ecaf9a0fcdb9a3532fcead64bd918676c1cf3c9f157b16ec667b1e4b206094b84e69e51f4751f0ca986b3395fe5
6
+ metadata.gz: ea45a8a95a5f78fe551459ca4fe8302e96cfdc5d9de59bf1f145693c900baeee128275efb84823af5ea2827f3ecdb6f0d05c9a233b283cee03d09836cad4fb46
7
+ data.tar.gz: af359ef24ea273d166fb8b0dd91ddccaaa9d13c5c42ef00b65da8a78939d59936b9df8ca37dc778b46fa2a9a5b542584c339819e86bd3a9ade904ffd28ce791e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,44 @@
1
+ ### 1.2.0
2
+
3
+ 2022-10-22 01:32
4
+
5
+ #### CHANGED
6
+
7
+ - `na add --to` now specifies a project, `--in` specifies a todo file
8
+ - Prefer fzf over gum when available
9
+
10
+ #### NEW
11
+
12
+ - `--edit` and `--delete` for saved searches (`na saved`)
13
+ - `na add --todo FILE` will match any known todo file when adding an action
14
+ - `na add --project PROJ` will match any existing project when adding an action
15
+ - `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
16
+ - `--tagged TAG` flag for `na update` searches by tag/value
17
+ - `na projects` will list all projects in a todo file, optional argument to query known todos
18
+ - `--delete` switch for `na update`
19
+
20
+ #### IMPROVED
21
+
22
+ - Include arguments with `na edit` to narrow down which file to edit (partial matching)
23
+ - Improved handling of todo file search arguments for `na next`
24
+ - If todo file search returns zero results, loosen search
25
+ - When using !negations in todo matching, allow the negation to match any part of the path, not just last element
26
+ - Full token matching when using `na todos QUERY`
27
+ - Offer gum and readline fallbacks for fzf menu with `na update`
28
+ - `--overwrite` option when adding a note using `na update` (defaults to append)
29
+ - Allow multiple file selections for `na update`
30
+ - Display "Inbox" as a parent
31
+ - Ignore @done actions in next and tagged (unless specifically included) but allow them to appear in `na find`
32
+
33
+ #### FIXED
34
+
35
+ - `na add --priority` being interpreted as note
36
+ - Immediately save created todo files to history
37
+ - Multi-line note handling
38
+ - Project regex
39
+ - Error when an action contains a left curly brace
40
+ - Don't show @done tasks unless specifically searched for
41
+
1
42
  ### 1.1.26
2
43
 
3
44
  2022-10-15 10:36
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.1.26)
4
+ na (1.2.0)
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.26
12
+ The current version of `na` is 1.2.0
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.0
63
63
 
64
64
  GLOBAL OPTIONS
65
65
  -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
@@ -81,10 +81,12 @@ COMMANDS
81
81
  init, create - Create a new todo file in the current directory
82
82
  initconfig - Initialize the config file using current global options
83
83
  next, show - Show next actions
84
+ projects - Show list of projects for a file
84
85
  prompt - Show or install prompt hooks for the current shell
85
86
  saved - Execute a saved search
86
87
  tagged - Find actions matching a tag
87
88
  todos - Show list of known todo files
89
+ update - Update an existing action
88
90
  ```
89
91
 
90
92
  #### Commands
@@ -107,13 +109,14 @@ DESCRIPTION
107
109
  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
110
 
109
111
  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
112
+ -d, --depth=DEPTH - Search for files X directories deep (default: 1)
113
+ -f, --file=PATH - Specify the file to which the task should be added (default: none)
114
+ --in, --todo=TODO_FILE - Add to a known todo file, partial matches allowed (default: none)
115
+ -n, --note - Prompt for additional notes
116
+ -p, --priority=PRIO - Add a priority level 1-5 (default: 0)
117
+ -t, --tag=TAG - Use a tag other than the default next action tag (default: none)
118
+ --to, --project, --proj=PROJECT - Add action to specific project (default: Inbox)
119
+ -x - Don't add next action tag to new entry
117
120
 
118
121
  EXAMPLES
119
122
 
@@ -246,11 +249,67 @@ EXAMPLES
246
249
  na next marked
247
250
  ```
248
251
 
252
+ ##### projects
253
+
254
+ 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.
255
+
256
+ ```
257
+ NAME
258
+ projects - Show list of projects for a file
259
+
260
+ SYNOPSIS
261
+
262
+ na [global options] projects [command options] [QUERY]
263
+
264
+ DESCRIPTION
265
+ 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`
266
+
267
+ COMMAND OPTIONS
268
+ -d, --depth=DEPTH - Search for files X directories deep (default: 1)
269
+ -p, --paths - Output projects as paths instead of hierarchy
270
+ ```
271
+
272
+ ##### saved
273
+
274
+ 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.
275
+
276
+ 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).
277
+
278
+ Run `na saved` without an argument to list your saved searches.
279
+
280
+ ```
281
+ NAME
282
+ saved - Execute a saved search
283
+
284
+ SYNOPSIS
285
+
286
+ na [global options] saved [command options] [SEARCH_TITLE]
287
+
288
+ DESCRIPTION
289
+ Run without argument to list saved searches
290
+
291
+ COMMAND OPTIONS
292
+ -d, --[no-]delete - Delete the specified search definition
293
+ -e, --[no-]edit - Open the saved search file in $EDITOR
294
+
295
+ EXAMPLES
296
+
297
+ na saved overdue
298
+
299
+ na saved over
300
+
301
+ na saved
302
+ ```
303
+
249
304
  ##### tagged
250
305
 
251
306
  Example: `na tagged feature +maybe`.
252
307
 
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.
308
+ 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.
309
+
310
+ 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"`.
311
+
312
+ To perform a string comparison, you can use `*=` (contains), `^=` (starts with), `$=` (ends with), or `=` (matches). E.g. `na tagged "note*=video"`.
254
313
 
255
314
  ```
256
315
  NAME
@@ -280,6 +339,81 @@ EXAMPLES
280
339
  na next marked
281
340
  ```
282
341
 
342
+ ##### todos
343
+
344
+ List all known todo files from history.
345
+
346
+ ```
347
+ NAME
348
+ todos - Show list of known todo files
349
+
350
+ SYNOPSIS
351
+
352
+ na [global options] todos [QUERY]
353
+
354
+ DESCRIPTION
355
+ 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`
356
+ ```
357
+
358
+ ##### update
359
+
360
+ Example: `na update --in na --archive my cool action`
361
+
362
+ 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).
363
+
364
+ 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.
365
+
366
+ You can specify a particular todo file using `--file PATH` or any todo from history using `--in QUERY`.
367
+
368
+ 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.
369
+
370
+ 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.
371
+
372
+ 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.
373
+
374
+ See the help output for a list of available actions.
375
+
376
+ ```
377
+ NAME
378
+ update - Update an existing action
379
+
380
+ SYNOPSIS
381
+
382
+ na [global options] update [command options] ACTION
383
+
384
+ DESCRIPTION
385
+ 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.
386
+
387
+ COMMAND OPTIONS
388
+ -a, --archive - Add a @done tag to action and move to Archive
389
+ --all - Act on all matches immediately (no menu)
390
+ -d, --depth=DEPTH - Search for files X directories deep (default: 1)
391
+ --delete - Delete an action
392
+ -e, --regex - Interpret search pattern as regular expression
393
+ -f, --finish, --done - Add a @done tag to action
394
+ --file=PATH - Specify the file to search for the task (default: none)
395
+ --in, --todo=TODO_FILE - Use a known todo file, partial matches allowed (default: none)
396
+ -n, --note - Prompt for additional notes. Input will be appended to any existing note.
397
+ -o, --overwrite - Overwrite note instead of appending
398
+ -p, --priority=PRIO - Add/change a priority level 1-5 (default: 0)
399
+ -r, --remove=TAG - Remove a tag to the action (may be used more than once, default: none)
400
+ -t, --tag=TAG - Add a tag to the action, @tag(values) allowed (may be used more than once, default: none)
401
+ --tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
402
+ --to, --project, --proj=PROJECT - Move action to specific project (default: none)
403
+ -x, --exact - Match pattern exactly
404
+
405
+ EXAMPLES
406
+
407
+ # Find "An existing task" action and remove the @na tag from it
408
+ na update --remove na "An existing task"
409
+
410
+ # Find "A bug..." action, add @waiting, add/update @priority(4), and prompt for an additional note
411
+ na update --tag waiting "A bug I need to fix" -p 4 -n
412
+
413
+ # Add @done to "My cool action" and immediately move to Archive
414
+ na update --archive My cool action
415
+ ```
416
+
283
417
  ### Configuration
284
418
 
285
419
  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 +452,11 @@ You can add a prompt command to your shell to have na automatically list your ne
318
452
 
319
453
  After installing a hook, you'll need to close your terminal and start a new session to initialize the new commands.
320
454
 
321
-
322
455
  ### Misc
323
456
 
324
- If you have [gum][] installed, na will use it for command line input when adding tasks and notes.
457
+ 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
458
 
459
+ [fzf]: https://github.com/junegunn/fzf
326
460
  [gum]: https://github.com/charmbracelet/gum
327
461
  [donate]: http://brettterpstra.com/donate/
328
462
  [github]: https://github.com/ttscoff/na_gem/