na 1.2.88 → 1.2.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.cursor/commands/changelog.md +3 -1
- data/.rubocop_todo.yml +12 -12
- data/CHANGELOG.md +36 -0
- data/Gemfile.lock +1 -1
- data/README.md +208 -57
- data/bin/commands/plugin.rb +271 -57
- data/bin/commands/update.rb +121 -90
- data/lib/na/action.rb +6 -0
- data/lib/na/actions.rb +3 -2
- data/lib/na/next_action.rb +24 -18
- data/lib/na/plugins.rb +152 -7
- data/lib/na/version.rb +1 -1
- data/src/_README.md +142 -55
- metadata +1 -2
- data/2025-10-29-one-more-na-update.md +0 -142
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5182be07e2e58ad67be0ba3f6107101ec1652ac54149e8798cd9b6638d5aa90
|
|
4
|
+
data.tar.gz: 4dbb72e1ed0948a170500aee910c3c4c948a836f998d8840c300140c3ff5d7d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ec130948601e1f66a719b3d5ee3aa42aceacdc1dabe8329bfaf3c65122cdf98f250e522b456306164592561ebe0afec5903ffd18fc24355809d1475648072e1
|
|
7
|
+
data.tar.gz: 3055f5bc4aa9b5a47eb0c3d13c0d501e35c7b189a8f6ae66dcad368142dfed49f7995c890dc2ab3ca314fc68b3e38ec67ebf1311f02c3a839300d5db44d8a2de
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
Write a commmit message that uses @ labels to specify what type of change each line is. Apply @new, @fixed, @changed, @improved, and @breaking as appropriate to each line. Only add @ labels to changes that affect the user, not technical details. Technical details can be included in the commit, just don't add @ labels to those lines. Be sure to include a general description (< 60 characters) as the first line, followed by a line break.
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
Save this commit message to commit_message.txt. Overwrite existing contents.
|
|
4
|
+
Save this commit message to commit_message.txt. Overwrite existing contents.
|
|
5
|
+
|
|
6
|
+
Save this commit message to commit_message.txt{% if args.reset %}. Overwrite existing contents.{% else %}. Update the file, merging changes, if file exists, otherwise create new.{% endif %}
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2025-10-
|
|
3
|
+
# on 2025-10-29 10:08:55 UTC using RuboCop version 1.75.7.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
@@ -21,18 +21,18 @@ Lint/UnusedMethodArgument:
|
|
|
21
21
|
Exclude:
|
|
22
22
|
- 'lib/na/string.rb'
|
|
23
23
|
|
|
24
|
-
# Offense count:
|
|
24
|
+
# Offense count: 49
|
|
25
25
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
26
26
|
Metrics/AbcSize:
|
|
27
|
-
Max:
|
|
27
|
+
Max: 281
|
|
28
28
|
|
|
29
29
|
# Offense count: 11
|
|
30
30
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
31
31
|
# AllowedMethods: refine
|
|
32
32
|
Metrics/BlockLength:
|
|
33
|
-
Max:
|
|
33
|
+
Max: 159
|
|
34
34
|
|
|
35
|
-
# Offense count:
|
|
35
|
+
# Offense count: 6
|
|
36
36
|
# Configuration parameters: CountBlocks, CountModifierForms.
|
|
37
37
|
Metrics/BlockNesting:
|
|
38
38
|
Max: 4
|
|
@@ -40,32 +40,32 @@ Metrics/BlockNesting:
|
|
|
40
40
|
# Offense count: 6
|
|
41
41
|
# Configuration parameters: CountComments, CountAsOne.
|
|
42
42
|
Metrics/ClassLength:
|
|
43
|
-
Max:
|
|
43
|
+
Max: 911
|
|
44
44
|
|
|
45
45
|
# Offense count: 34
|
|
46
46
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
47
47
|
Metrics/CyclomaticComplexity:
|
|
48
|
-
Max:
|
|
48
|
+
Max: 84
|
|
49
49
|
|
|
50
|
-
# Offense count:
|
|
50
|
+
# Offense count: 55
|
|
51
51
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
52
52
|
Metrics/MethodLength:
|
|
53
|
-
Max:
|
|
53
|
+
Max: 188
|
|
54
54
|
|
|
55
55
|
# Offense count: 5
|
|
56
56
|
# Configuration parameters: CountComments, CountAsOne.
|
|
57
57
|
Metrics/ModuleLength:
|
|
58
|
-
Max:
|
|
58
|
+
Max: 913
|
|
59
59
|
|
|
60
60
|
# Offense count: 5
|
|
61
61
|
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
|
62
62
|
Metrics/ParameterLists:
|
|
63
|
-
Max:
|
|
63
|
+
Max: 23
|
|
64
64
|
|
|
65
65
|
# Offense count: 33
|
|
66
66
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
67
67
|
Metrics/PerceivedComplexity:
|
|
68
|
-
Max:
|
|
68
|
+
Max: 97
|
|
69
69
|
|
|
70
70
|
# Offense count: 1
|
|
71
71
|
# Configuration parameters: ForbiddenDelimiters.
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
### 1.2.89
|
|
2
|
+
|
|
3
|
+
2025-10-29 06:36
|
|
4
|
+
|
|
5
|
+
#### CHANGED
|
|
6
|
+
|
|
7
|
+
- Completed plugin subcommand sections with aliases and context
|
|
8
|
+
- Plugins section updated with management workflow and notes
|
|
9
|
+
- Sample plugins can be regenerated with --generate-examples when deleted
|
|
10
|
+
- Shortcut `na plugin NAME` works without run command flags (use `na plugin run NAME` for flags)
|
|
11
|
+
- Update menu shows a single "Run Plugin" option leading to a plugin submenu
|
|
12
|
+
- Documentation/blog now uses `na plugin run NAME` (keeps `na plugin NAME` as shortcut)
|
|
13
|
+
|
|
14
|
+
#### NEW
|
|
15
|
+
|
|
16
|
+
- Added plugin enable/disable and flow tests (update/move behaviors)
|
|
17
|
+
- Document plugin subcommands (new/edit/run/enable/disable)
|
|
18
|
+
- `--generate-examples` flag regenerates sample plugins and README
|
|
19
|
+
- `na plugin NAME` shortcut defaults to `na plugin run NAME`
|
|
20
|
+
|
|
21
|
+
#### IMPROVED
|
|
22
|
+
|
|
23
|
+
- `na plugin run` prompts for plugin and action selection when no filters
|
|
24
|
+
- README: brief descriptions for `plugin` subcommands
|
|
25
|
+
- README plugin command docs with brief descriptions
|
|
26
|
+
- Sample plugins only generated once (tracked via .samples_generated flag)
|
|
27
|
+
- Plugin submenu lists only enabled plugins with input/output metadata
|
|
28
|
+
- Blog post adds concise overview of plugin subcommands
|
|
29
|
+
|
|
30
|
+
#### FIXED
|
|
31
|
+
|
|
32
|
+
- Plugin-applied updates now modify in place (no duplicate actions)
|
|
33
|
+
- Suppressed Y/N prompts during plugin operations and non-interactive runs
|
|
34
|
+
- `--only_timed` filtering (case-insensitive tag keys) in output
|
|
35
|
+
- Stabilized wrapping by removing test override of String#wrap
|
|
36
|
+
|
|
1
37
|
### 1.2.88
|
|
2
38
|
|
|
3
39
|
2025-10-28 08:22
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -9,7 +9,47 @@
|
|
|
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.2.
|
|
12
|
+
The current version of `na` is 1.2.89.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Table of contents
|
|
16
|
+
|
|
17
|
+
- [Installation](#installation)
|
|
18
|
+
- [Optional Dependencies](#optional-dependencies)
|
|
19
|
+
- [Features](#features)
|
|
20
|
+
- [Easy matching](#easy-matching)
|
|
21
|
+
- [Recursion](#recursion)
|
|
22
|
+
- [Adding todos](#adding-todos)
|
|
23
|
+
- [Updating todos](#updating-todos)
|
|
24
|
+
- [Terminology](#terminology)
|
|
25
|
+
- [Usage](#usage)
|
|
26
|
+
- [Commands](#commands)
|
|
27
|
+
- [add](#add)
|
|
28
|
+
- [edit](#edit)
|
|
29
|
+
- [find](#find)
|
|
30
|
+
- [init, create](#init-create)
|
|
31
|
+
- [move](#move)
|
|
32
|
+
- [next, show](#next-show)
|
|
33
|
+
- [plugin](#plugin)
|
|
34
|
+
- [projects](#projects)
|
|
35
|
+
- [saved](#saved)
|
|
36
|
+
- [scan](#scan)
|
|
37
|
+
- [tagged](#tagged)
|
|
38
|
+
- [todos](#todos)
|
|
39
|
+
- [update](#update)
|
|
40
|
+
- [changelog](#changelog)
|
|
41
|
+
- [complete](#complete)
|
|
42
|
+
- [archive](#archive)
|
|
43
|
+
- [tag](#tag)
|
|
44
|
+
- [undo](#undo)
|
|
45
|
+
- [Configuration](#configuration)
|
|
46
|
+
- [Working with a single global file](#working-with-a-single-global-file)
|
|
47
|
+
- [Add tasks at the end of a project](#add-tasks-at-the-end-of-a-project)
|
|
48
|
+
- [Prompt Hooks](#prompt-hooks)
|
|
49
|
+
- [Time tracking](#time-tracking)
|
|
50
|
+
- [Plugins](#plugins)
|
|
51
|
+
- [Changelog](#changelog)
|
|
52
|
+
|
|
13
53
|
|
|
14
54
|
`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
55
|
|
|
@@ -76,7 +116,7 @@ SYNOPSIS
|
|
|
76
116
|
na [global options] command [command options] [arguments...]
|
|
77
117
|
|
|
78
118
|
VERSION
|
|
79
|
-
1.2.
|
|
119
|
+
1.2.89
|
|
80
120
|
|
|
81
121
|
GLOBAL OPTIONS
|
|
82
122
|
-a, --add - Add a next action (deprecated, for backwards compatibility)
|
|
@@ -112,7 +152,7 @@ COMMANDS
|
|
|
112
152
|
move - Move an existing action to a different section
|
|
113
153
|
next, show - Show next actions
|
|
114
154
|
open - Open a todo file in the default editor
|
|
115
|
-
plugin -
|
|
155
|
+
plugin - Manage and run plugins
|
|
116
156
|
projects - Show list of projects for a file
|
|
117
157
|
prompt - Show or install prompt hooks for the current shell
|
|
118
158
|
restore, unfinish - Find and remove @done tag from an action
|
|
@@ -382,6 +422,121 @@ EXAMPLES
|
|
|
382
422
|
na next marked
|
|
383
423
|
```
|
|
384
424
|
|
|
425
|
+
##### plugin
|
|
426
|
+
|
|
427
|
+
Manage and run external plugins. See also the Plugins section below.
|
|
428
|
+
|
|
429
|
+
```
|
|
430
|
+
NAME
|
|
431
|
+
plugin - Manage and run plugins
|
|
432
|
+
|
|
433
|
+
SYNOPSIS
|
|
434
|
+
|
|
435
|
+
na [global options] plugin [command options]
|
|
436
|
+
|
|
437
|
+
na [global options] plugin [command options] disable NAME
|
|
438
|
+
|
|
439
|
+
na [global options] plugin [command options] edit NAME
|
|
440
|
+
|
|
441
|
+
na [global options] plugin [command options] enable NAME
|
|
442
|
+
|
|
443
|
+
na [global options] plugin [command options] list [--type TYPE|-t TYPE]
|
|
444
|
+
|
|
445
|
+
na [global options] plugin [command options] new [--language LANG|--lang LANG] NAME
|
|
446
|
+
|
|
447
|
+
na [global options] plugin [command options] run [--divider STRING] [--done] [--file PATH|--in PATH] [--input TYPE] [--output TYPE] [--search QUERY|--find QUERY|--grep QUERY] [--tagged TAG] [-d DEPTH|--depth DEPTH] NAME
|
|
448
|
+
|
|
449
|
+
COMMAND OPTIONS
|
|
450
|
+
--[no-]generate-examples - Regenerate sample plugins and README
|
|
451
|
+
|
|
452
|
+
COMMANDS
|
|
453
|
+
<default> -
|
|
454
|
+
disable, d - Disable an enabled plugin
|
|
455
|
+
edit - Edit an existing plugin
|
|
456
|
+
enable, e - Enable a disabled plugin
|
|
457
|
+
list, ls - List available plugins
|
|
458
|
+
new, n - Create a new plugin
|
|
459
|
+
run, x - Run a plugin on selected actions
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
###### plugin new
|
|
463
|
+
|
|
464
|
+
Create a new plugin script (aliases: `n`). Infers shebang by extension or `--language`.
|
|
465
|
+
|
|
466
|
+
```
|
|
467
|
+
NAME
|
|
468
|
+
new - Create a new plugin
|
|
469
|
+
|
|
470
|
+
SYNOPSIS
|
|
471
|
+
|
|
472
|
+
na [global options] plugin new [command options] NAME
|
|
473
|
+
|
|
474
|
+
COMMAND OPTIONS
|
|
475
|
+
--language, --lang=LANG - Language/ext (e.g. rb, py, /usr/bin/env bash) (default: none)
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
###### plugin edit
|
|
479
|
+
|
|
480
|
+
Open an existing plugin in your default editor. Prompts if no name is given.
|
|
481
|
+
|
|
482
|
+
```
|
|
483
|
+
NAME
|
|
484
|
+
edit - Edit an existing plugin
|
|
485
|
+
|
|
486
|
+
SYNOPSIS
|
|
487
|
+
|
|
488
|
+
na [global options] plugin edit NAME
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
###### plugin run
|
|
492
|
+
|
|
493
|
+
Run a plugin on selected actions (aliases: `x`). Supports input/output format flags and filters.
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
NAME
|
|
497
|
+
run - Run a plugin on selected actions
|
|
498
|
+
|
|
499
|
+
SYNOPSIS
|
|
500
|
+
|
|
501
|
+
na [global options] plugin run [command options] NAME
|
|
502
|
+
|
|
503
|
+
COMMAND OPTIONS
|
|
504
|
+
-d, --depth=DEPTH - Search for files X directories deep (default: 1)
|
|
505
|
+
--divider=STRING - Text divider when using --input/--output text (default: none)
|
|
506
|
+
--[no-]done - Include @done actions
|
|
507
|
+
--file, --in=PATH - Specify the file to search for the task (default: none)
|
|
508
|
+
--input=TYPE - Input format (json|yaml|csv|text) (default: none)
|
|
509
|
+
--output=TYPE - Output format (json|yaml|csv|text) (default: none)
|
|
510
|
+
--search, --find, --grep=QUERY - Filter results using search terms (may be used more than once, default: none)
|
|
511
|
+
--tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
###### plugin enable
|
|
515
|
+
|
|
516
|
+
Move a plugin from `plugins_disabled` to `plugins` (alias: `e`).
|
|
517
|
+
|
|
518
|
+
```
|
|
519
|
+
NAME
|
|
520
|
+
enable - Enable a disabled plugin
|
|
521
|
+
|
|
522
|
+
SYNOPSIS
|
|
523
|
+
|
|
524
|
+
na [global options] plugin enable NAME
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
###### plugin disable
|
|
528
|
+
|
|
529
|
+
Move a plugin from `plugins` to `plugins_disabled` (alias: `d`).
|
|
530
|
+
|
|
531
|
+
```
|
|
532
|
+
NAME
|
|
533
|
+
disable - Disable an enabled plugin
|
|
534
|
+
|
|
535
|
+
SYNOPSIS
|
|
536
|
+
|
|
537
|
+
na [global options] plugin disable NAME
|
|
538
|
+
```
|
|
539
|
+
|
|
385
540
|
##### projects
|
|
386
541
|
|
|
387
542
|
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.
|
|
@@ -661,49 +816,6 @@ EXAMPLES
|
|
|
661
816
|
na update --archive My cool action
|
|
662
817
|
```
|
|
663
818
|
|
|
664
|
-
#### Time tracking
|
|
665
|
-
|
|
666
|
-
`na` supports tracking elapsed time between a start and finish for actions using `@started(YYYY-MM-DD HH:MM)` and `@done(YYYY-MM-DD HH:MM)` tags. Durations are not stored; they are calculated on the fly from these tags.
|
|
667
|
-
|
|
668
|
-
- Add/Finish/Update flags:
|
|
669
|
-
- `--started TIME` set a start time when creating or finishing an item
|
|
670
|
-
- `--end TIME` (alias `--finished`) set a done time
|
|
671
|
-
- `--duration DURATION` backfill start time from the provided end time
|
|
672
|
-
- All flags accept natural language (via Chronic) and shorthand: `30m ago`, `-2h`, `2h30m`, `2:30 ago`, `yesterday 5pm`
|
|
673
|
-
|
|
674
|
-
Examples:
|
|
675
|
-
|
|
676
|
-
```bash
|
|
677
|
-
na add --started "30 minutes ago" "Investigate bug"
|
|
678
|
-
na complete --finished now --duration 2h30m "Investigate bug"
|
|
679
|
-
na update --started "yesterday 3pm" --end "yesterday 5:15pm" "Investigate bug"
|
|
680
|
-
```
|
|
681
|
-
|
|
682
|
-
- Display flags (next/tagged):
|
|
683
|
-
- `--times` show per???action durations and a grand total (implies `--done`)
|
|
684
|
-
- `--human` format durations as human???readable text instead of `DD:HH:MM:SS`
|
|
685
|
-
- `--only_timed` show only actions that have both `@started` and `@done` (implies `--times --done`)
|
|
686
|
-
- `--only_times` output only the totals section (no action lines; implies `--times --done`)
|
|
687
|
-
- `--json_times` output a JSON object with timed items, per???tag totals, and overall total (implies `--times --done`)
|
|
688
|
-
|
|
689
|
-
Example outputs:
|
|
690
|
-
|
|
691
|
-
```bash
|
|
692
|
-
# Per???action durations appended and totals table
|
|
693
|
-
na next --times --human
|
|
694
|
-
|
|
695
|
-
# Only totals table (Markdown), no action lines
|
|
696
|
-
na tagged "tag*=bug" --only_times
|
|
697
|
-
|
|
698
|
-
# JSON for scripting
|
|
699
|
-
na next --json_times > times.json
|
|
700
|
-
```
|
|
701
|
-
|
|
702
|
-
Notes:
|
|
703
|
-
|
|
704
|
-
- Any newly added or edited action text is scanned for natural???language values in `@started(...)`/`@done(...)` and normalized to `YYYY???MM???DD HH:MM`.
|
|
705
|
-
- The color of durations in output is configurable via the theme key `duration` (defaults to `{y}`).
|
|
706
|
-
|
|
707
819
|
##### changelog
|
|
708
820
|
|
|
709
821
|
View recent changes with `na changelog` or `na changes`.
|
|
@@ -915,6 +1027,49 @@ If you're using a single global file, you'll need `--cwd_as` to be `tag` or `pro
|
|
|
915
1027
|
|
|
916
1028
|
After installing a hook, you'll need to close your terminal and start a new session to initialize the new commands.
|
|
917
1029
|
|
|
1030
|
+
### Time tracking
|
|
1031
|
+
|
|
1032
|
+
`na` supports tracking elapsed time between a start and finish for actions using `@started(YYYY-MM-DD HH:MM)` and `@done(YYYY-MM-DD HH:MM)` tags. Durations are not stored; they are calculated on the fly from these tags.
|
|
1033
|
+
|
|
1034
|
+
- Add/Finish/Update flags:
|
|
1035
|
+
- `--started TIME` set a start time when creating or finishing an item
|
|
1036
|
+
- `--end TIME` (alias `--finished`) set a done time
|
|
1037
|
+
- `--duration DURATION` backfill start time from the provided end time
|
|
1038
|
+
- All flags accept natural language (via Chronic) and shorthand: `30m ago`, `-2h`, `2h30m`, `2:30 ago`, `yesterday 5pm`
|
|
1039
|
+
|
|
1040
|
+
Examples:
|
|
1041
|
+
|
|
1042
|
+
```bash
|
|
1043
|
+
na add --started "30 minutes ago" "Investigate bug"
|
|
1044
|
+
na complete --finished now --duration 2h30m "Investigate bug"
|
|
1045
|
+
na update --started "yesterday 3pm" --end "yesterday 5:15pm" "Investigate bug"
|
|
1046
|
+
```
|
|
1047
|
+
|
|
1048
|
+
- Display flags (next/tagged):
|
|
1049
|
+
- `--times` show per???action durations and a grand total (implies `--done`)
|
|
1050
|
+
- `--human` format durations as human???readable text instead of `DD:HH:MM:SS`
|
|
1051
|
+
- `--only_timed` show only actions that have both `@started` and `@done` (implies `--times --done`)
|
|
1052
|
+
- `--only_times` output only the totals section (no action lines; implies `--times --done`)
|
|
1053
|
+
- `--json_times` output a JSON object with timed items, per???tag totals, and overall total (implies `--times --done`)
|
|
1054
|
+
|
|
1055
|
+
Example outputs:
|
|
1056
|
+
|
|
1057
|
+
```bash
|
|
1058
|
+
# Per???action durations appended and totals table
|
|
1059
|
+
na next --times --human
|
|
1060
|
+
|
|
1061
|
+
# Only totals table (Markdown), no action lines
|
|
1062
|
+
na tagged "tag*=bug" --only_times
|
|
1063
|
+
|
|
1064
|
+
# JSON for scripting
|
|
1065
|
+
na next --json_times > times.json
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
Notes:
|
|
1069
|
+
|
|
1070
|
+
- Any newly added or edited action text is scanned for natural???language values in `@started(...)`/`@done(...)` and normalized to `YYYY???MM???DD HH:MM`.
|
|
1071
|
+
- The color of durations in output is configurable via the theme key `duration` (defaults to `{y}`).
|
|
1072
|
+
|
|
918
1073
|
### Plugins
|
|
919
1074
|
|
|
920
1075
|
NA supports a plugin system that allows you to run external scripts to transform or process actions. Plugins are stored in `~/.local/share/na/plugins` and can be written in any language with a shebang.
|
|
@@ -929,19 +1084,15 @@ You can delete or modify these sample plugins as needed.
|
|
|
929
1084
|
|
|
930
1085
|
#### Running Plugins
|
|
931
1086
|
|
|
932
|
-
|
|
933
|
-
```bash
|
|
934
|
-
na plugin PLUGIN_NAME
|
|
935
|
-
```
|
|
1087
|
+
You can manage and run plugins using subcommands under `na plugin`:
|
|
936
1088
|
|
|
937
|
-
|
|
1089
|
+
- `new`/`n`: scaffold a new plugin script
|
|
1090
|
+
- `edit`: open an existing plugin
|
|
1091
|
+
- `run`/`x`: run a plugin against selected actions
|
|
1092
|
+
- `enable`/`e`: move from disabled to enabled
|
|
1093
|
+
- `disable`/`d`: move from enabled to disabled
|
|
938
1094
|
|
|
939
|
-
|
|
940
|
-
na update --plugin PLUGIN_NAME # Run plugin on selected actions
|
|
941
|
-
na next --plugin PLUGIN_NAME # Transform output only (no file writes)
|
|
942
|
-
na tagged bug --plugin PLUGIN_NAME # Filter and transform
|
|
943
|
-
na find "search term" --plugin PLUGIN_NAME
|
|
944
|
-
```
|
|
1095
|
+
Plugins are executed with actions on STDIN and must return actions on STDOUT. Display commands can still pipe through plugins via `--plugin`, which only affects STDOUT (no writes).
|
|
945
1096
|
|
|
946
1097
|
#### Plugin Metadata
|
|
947
1098
|
|