I’ve updated na with some new stuff I thought I’d share.

First off, I wanted an easy way to archive all @done actions in one swoop without having to use a lot of flags and switches to locate them and move them. So I added an archive command, which takes a search string as an argument, but also has a --done switch that will archive all @done tasks. So you can just run na archive --done, select the file to affect if there are multiple available, and presto, “archive all finished” is done, just like in TaskPaper.

NAME
    archive - Mark an action as @done and archive

SYNOPSIS

    na [global options] archive [command options] ACTION

COMMAND OPTIONS
    --all             - Act on all matches immediately (no menu)
    -d, --depth=DEPTH - Search for files X directories deep (default: 1)
    --done            - Archive all done tasks
    -e, --regex       - Interpret search pattern as regular expression
    --file=PATH       - Specify the file to search for the task (default: none)
    -n, --note        - Prompt for additional notes. Input will be appended to any existing note. If STDIN input (piped) is detected, it
                        will be used as a note.
    -o, --overwrite   - Overwrite note instead of appending
    --tagged=TAG      - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
    -x, --exact       - Match pattern exactly

EXAMPLE

    # Find "An existing task", mark @done if needed, and move to archive
    na archive "An existing task"

I also added a complete command that will add a @done tag to whatever action matches your search (menu provided for multiple results), or all matches using the --all switch. It’s basically a shortcut for na update --finish SEARCH_STRING. It’s aliased as finish as well. Both the archive and complete commands have a --note switch that allows you to add a note (prompted if there’s nothing piped to it). All of the matching options from the update command are available, including --tagged for searching by tag and --regex for doing a regular expression search. complete has a --archive switch that will simultaneously add a @done tag and move the action to the Archive.

NAME
    complete - Find and mark an action as @done

SYNOPSIS

    na [global options] complete [command options] ACTION

COMMAND OPTIONS
    -a, --archive     - Add a @done tag to action and move to Archive
    --all             - Act on all matches immediately (no menu)
    -d, --depth=DEPTH - Search for files X directories deep (default: 1)
    -e, --regex       - Interpret search pattern as regular expression
    --file=PATH       - Specify the file to search for the task (default: none)
    -n, --note        - Prompt for additional notes. Input will be appended to any existing note. If STDIN input (piped) is detected, it
                        will be used as a note.
    -o, --overwrite   - Overwrite note instead of appending
    --tagged=TAG      - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
    -x, --exact       - Match pattern exactly

EXAMPLES

    # Find "An existing task" and mark @done
    na complete "An existing task"

    # Alias for complete
    na finish "An existing task"

I know of a few people making extensive use of na. If you’re among them and have a feature request, don’t be shy about posting an issue or contacting me directly.

Check out the project page for more info.