More na updates
I’ve put some more time into both Journal and na
. The latest version of na
represents quite a few hours of tinkering. See the na project page for full details. In case you’ve missed in previously, na
is my command line tool for reading and modifying TaskPaper files in your projects.
I think the biggest thing I’ve added is theming. You can now control the colorized output of your actions using a file at ~/.local/share/na/theme.yaml
. That file is automatically written by na if it runs and it doesn’t exist, and once it’s there, it should be pretty self explanatory. You can use {y}
type placeholders (that would make the following text yellow, a full list of color abbreviations is at the top of the file), and you can also use {#RGB}
and {#RRGGBB}
codes to get specific colors outside of the usual ANSI coloring.
I’ve added new commands like tag
(see na help tag
), and a new --restore
option to several commands for removing the @done tag from actions. There’s also a --replace
flag you can tie into na update --search SEARCH_STRING --replace REPLACE_STRING
to perform (wildcard-compatible) search and replace. Add --regex
to do a regex search and replace.
There’s a bunch of other new stuff, so I’ll just post the collected changelog.
NEW
- Global option
--include_ext
can be configured to use full extension when displaying filenames, allowing for command-clicking to open in compatible terminals - Tag command
- Add
--save NAME
tona next
to save more complex queries and run withna saved NAME
(or justna NAME
) na saved --select
flag to allow interactive selection of search(es)- Open the todos database in an editor with
na todos --edit
- A theme file is written to ~/.local/share/na/theme.yaml where you can modify the colors used for all displays
- Allow TAG=~PATTERN comparison for regex matching in
na tagged
na undo
command to undo last change or last change to file specified in argumentsna update --search OLD_TEXT --replace NEW_TEXT
(added –replace)
IMPROVED
- When displaying actions wider than the screen, wrap at words and indent 2 spaces from start of action (after prefix)
- When not showing notes, add an asterisk at the end of an action
- When showing notes, indent to the beginning of the action
- Add
--project
to archive, complete, and update to move a modified action to a new project when saving - Allow
na saved --delete
to handle multiple arguments - Allow wildcards when deleting saved searches
- Refactor request for input, no change to user experience
- Refined wildcard (?*) handling
- Better error message for
na next
when no todo is matched - If STDOUT isn’t a TTY, don’t enable pagination, regardless of global setting
- Disable pagination when using –omnifocus
- Allow –find or –grep as synonyms for –search
--in TODO
option forna complete
- If a search string contains @tags and –exact or –regex isn’t specified, the @tags will be extracted and passed as a –tagged search.
- Tag handling (including values and comparisons) in tags extracted from search strings
na complete --project PROJ
flag to move to a specific projectna restore --project PROJ
flag to move restored action to- Exit gracefully if tagged command is run with invalid arguments
- Display action affected when using update command
FIXED
- Change default :dirname coloring to fix an occasional highlighting issue
- Error when creating new project in todo file
- Error when last_modified.txt hasn’t been written yet
- Nil error in action.pretty
- Date tags containing hyphens triggered OR searches because they were initially interpreted as negative tag searches
- Templating irregularities
- Error thrown when running without $EDITOR variable defined in environment
- New project not being added when requested
- Error when
na add --to PROJECT
was a project that didn’t exist --no-color
wasn’t stripping templated hex codes- Escape search for tokens to allow parenthesis and other reserved characters
More details on the project page!