---
title: A bit more na work
date: 2023-08-30 12:02
slug: a-bit-more-na-work
categories:
- Code
tags:
- na
- productivity
- taskpaper
---

[na]: https://brettterpstra.com/projects/na/ "na - BrettTerpstra.com"
[last week]: https://brettterpstra.com/2023/08/22/some-na-updates-and-new-commands/
[commands]: https://github.com/ttscoff/na_gem/tree/main/bin/commands

I went on a trip to Minneapolis this weekend. It went really well; I saw some 
great friends, ate some great food, and spent some early mornings coding at the hotel. I was just coding to kill time when I couldn't sleep, and playing with [`na`][na] seemed like the perfect way to do it.

The first thing I did was take a second stab at "decomposing" the main binary so that each command had its own file, just to make maintenance easier. Finally got that working properly. It won't change anything for the user, but it's so much nicer [to look at][commands].

In addition to the `complete` and `archive` commands I [added last week][last week], the `update` command now has a `--restore` flag that can be used to remove the @done tag from an action or actions. It's the same as using `--remove done`, but I find it just a little more intuitive. This flag is mirrored as an `na restore [SEARCH]` (or `na unfinish [SEARCH]`) command.

I also added pagination, so for output that is longer than your screen, it will now pause using `less` or `more` if available, letting you page through with shortcut keys. This also applies to the `help` command, so it's easier to wade through the extensive documentation that the command provides. You can disable this with `na --no-pager [COMMAND]`, a setting which can be saved to your config.

I added an `na completed` command to view @done actions. It accepts `--before`, `--on`, and `--after` flags that recognize natural language dates and can be combined. You can also use `--tagged TAG` to find actions tagged with any combination of tags (use comma separated list or use the flag multiple times, include a `+` to make a tag mandatory, `!` to negate). Any arguments passed to the command will function as a tokenized text search. And, of course, you can run it with `--save [NAME]` to save a complex search for later use with the `na saved` command.

Speaking of saved searches, I also changed the `saved` command to allow multiple saved searches to run at once. So now if you have a saved search for low priority and one for medium priority, you can run them both together with `na saved lowprio medprio` and get combined results.

Also:

- `--done` flag not working on `na next`
- Missing descriptions in help examples
- When replacing a priority tag, remove any space before it the action text
- Detect @tags in search strings and convert them to tag search with comparisons

Check out [the project page][na] for installation and usage details.

## na

Project: [na](https://brettterpstra.com/projects/na.md)

- [Web Excursions for October 19th, 2026](https://brettterpstra.com/2026/10/19/web-excursions-for-october-19th-2026.md): 2026-10-19
- [New, faster NA](https://brettterpstra.com/2026/07/04/new-faster-na.md): 2026-07-04
- [TaskPaper search syntax for NA](https://brettterpstra.com/2025/12/03/taskpaper-search-syntax-for-na.md): 2025-12-03
- [One more na update](https://brettterpstra.com/2025/10/29/one-more-na-update.md): 2025-10-29
- [Optimizing na and doing](https://brettterpstra.com/2025/10/23/optimizing-na-and-doing.md): 2025-10-23
- [Brett's Favorites 2023](https://brettterpstra.com/2023/12/08/bretts-favorites-2023.md): 2023-12-08
- [More na updates](https://brettterpstra.com/2023/09/09/more-na-updates.md): 2023-09-09
- [A bit more na work](https://brettterpstra.com/2023/08/30/a-bit-more-na-work.md): 2023-08-30
- [Some na updates and new commands](https://brettterpstra.com/2023/08/22/some-na-updates-and-new-commands.md): 2023-08-22
- [Brett's Favorites 2022 - Personal Projects](https://brettterpstra.com/2022/11/30/bretts-favorites-2022-personal-projects.md): 2022-11-30
- [na with a global file](https://brettterpstra.com/2022/10/25/na-with-a-global-file.md): 2022-10-25
- [na can now edit your actions](https://brettterpstra.com/2022/10/22/na-can-now-edit-your-actions.md): 2022-10-22
- [na with saved search](https://brettterpstra.com/2022/10/07/na-with-saved-search.md): 2022-10-07
- [na as a TaskPaper query tool](https://brettterpstra.com/2022/10/06/na-as-a-taskpaper-query-tool.md): 2022-10-06
- [Revamping na (Next Action CLI)](https://brettterpstra.com/2022/09/28/revamping-na-next-action-cli.md): 2022-09-28
- [Branching out from Bash: Fishing expedition](https://brettterpstra.com/2019/10/11/branching-out-from-bash-fishing-expedition.md): 2019-10-11
- [Task management for coders](https://brettterpstra.com/2017/12/01/task-management-for-coders.md): 2017-12-01

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
