Advanced Usage

Here are the other commands, in some detail.

% task

With no arguments, this command will generate a help message that lists all these commands.

However, if the following configuration variable is specified:

default.command=list pri:H

Then this command will be run whenever task is run without arguments. This means that your most common task command can be run simply with the command:

% task
[task list project:foo]

ID Project Pri Description
 1 foo     H   Design the thing
 2 foo         Build the thing
% task projects

This report generates a list of all the different projects that you are using along with a count of the pending tasks for each project. For example:

% task projects

Project   Tasks
Errands       1
Birthdays     3
Car           2
% task summary

This report lists all the projects and a summary of their task status.

% task summary

Project  Remaining Avg age Complete 0%                        100%
Errands          1  3 days      50% XXXXXXXXXXXXXXXX
Birthdays        3  7 mths       0%
Car              2   2 wks      25% XXXXXXXXX

This shows the project, the remaining tasks, the average age of each task, the percentage completed (remaining vs total) and a bar indicating that percentage.

% task delete <id>

There are two ways of getting rid of tasks - mark them as done, or delete them.

% task undelete <id>

If a task was inadvertently deleted, it may be undeleted, provided that no reports have been run since the deletion. Ideally, the undelete command is run immediately after the erroneous delete command.

If a report is run (such as "task list"), then task performs a garbage collection that removes deleted tasks, and the task cannot be undeleted.

% task done <id>

This is how a task is marked as done.

% task list ...

The list report will show the active status, and age of the task in addition to the columns that "task ls" shows. It is just a more detailed list.

% task long ...

The long report will show the entry date and start date of a task, in addition to the columns that the "task list" shows.

% task start <id>

This marks a task as started (and therefore active), which is shown in the "list" report:

% task list

ID Project Pri Due Active Age     Description
12 Errand  L                      Remember to deposit check
...

% task start 12
% task list

ID Project Pri Due Active Age     Description
12 Errand  L       *      3 days  Remember to deposit check
...
% task active

Shows all active tasks, that is, the tasks for which the "task start ..." command was run, as shown above.

% task overdue

Simply lists all the task that have a due date that is past, in "list" format.

% task history

This report shows you an overview of how many tasks were added, completed and deleted, by month. It looks like this:

% task history

Year Month     Added Completed Deleted Net
2008 March        21        16       0   5
     April        13        11       1   1
     May           8        14       3  -9

This shows that for the three months that task has been used, March and April saw the total number of tasks increase, but in May the number decreased as more task were completed than added.

% task calendar

This report shows a calendar of the current month, with any task due or overdue dates marked on it. Color is used to mark these dates.

% task calendar

May 2008

Su Mo Tu We Th Fr Sa
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
% task next

This report shows you the tasks you should probable work on next. Task will scan all the tasks and will pick two task from each project to report. Those two tasks will be chosen in order of overdue, due soon, High, Medium or Low priority. Essentially task chooses the two most important task for each project and displays them ordered in the usual way.

If you wish to show a different number of tasks per project, modify the entry in .taskrc:

next=2

To be your preferred number.

% task <id> ...

When a task id is specified, everything applies to just that task. Suppose we needed to correct a task:

% task ls

ID Project Pri Description
12 Errand  L   Remember to deposit chekc
...

% task 12 Remember to deposit bonus check
% task ls

ID Project Pri Description
12 Errand  L   Remember to deposit bonus check
...
% task oldest

Lists the oldest tasks. Shows 10 tasks by default, but can be set via the "oldest" configuration variable.

% task newest

Lists the newest tasks. Shows 10 tasks by default, but can be set via the "newest" configuration variable.

% task /from/to/

If a task has been entered with a typo, it can be easily corrected by this command. For example:

% task ls

ID Project Pri Description
12 Errand  L   Remember to deposit chekc
...

% task 12 /chekc/check/
% task ls

ID Project Pri Description
12 Errand  L   Remember to deposit check
...

This command makes single corrections to a task description.

% task tags

This command will generate a list of all the tags that are currently in use by task.

% task info <id>

This command gives detailed information about a single task. It will tell you when the task was entered, when started, its status, tags, and more.

% task stats

This command generates a list of statistics about your task usage, such as the average time it takes to complete a task, how often new tasks are added, and more.

% task completed

This generates a list of all tasks that have been completed, sorted by their completion date.

% task export <file name>

This instructs task to write out a CSV format dump of all tasks, both pending and completed, to the file specified. This is how you might view tasks in a spreadsheet.

% task colors

This command displays all the colors that task supports.

% task usage

If logging has been enabled by the "command.logging=on" directive in the .taskrc file, then task will record every command that is run. When this command is run, task will display a count of how many times each command was used.

This command is for the purpose of seeing whether command are actually used.

% task version

This can be used to show the version number of task, and to display all the current configuration settings, as read from the .taskrc file.

% task rc:<file> ...

By specifying rc:, it is possible to force task to use an alternate .taskrc file. By default, task looks in your home directory, so these two commands are essentially identical:

% task list
% task rc:~/.taskrc list

What this override allows, is the possibility of keeping your task lists completely separate, say for work and home. This can be accomplished with the following commands (valid for bash):

% alias htask="task rc:/home/me/.taskrc_home"
% alias wtask="task rc:/home/me/.taskrc_work"
% htask list
...
% wtask list
...
% task <id> fg:... bg:...

Not strictly a command, the setting of the fg and bg (foreground and background) attributes determines the colors used to represent the task. Valid foreground colors are:

         bold          underline          bold_underline
black    bold_black    underline_black    bold_underline_black
red      bold_red      underline_red      bold_underline_red
green    bold_green    underline_green    bold_underline_green
yellow   bold_yellow   underline_yellow   bold_underline_yellow
blue     bold_blue     underline_blue     bold_underline_blue
magenta  bold_magenta  underline_magenta  bold_underline_magenta
cyan     bold_cyan     underline_cyan     bold_underline_cyan
white    bold_white    underline_white    bold_underline_white

Note that these are not just colors, but combinations of colors and attributes. Valid background colors are:

on_black    on_bright_black
on_red      on_bright_red
on_green    on_bright_green
on_yellow   on_bright_yellow
on_blue     on_bright_blue
on_magenta  on_bright_magenta
on_cyan     on_bright_cyan
on_white    on_bright_white

Note also that this capability does depend on whether your terminal program can display these colors.



Copyright 2006-2008, P. Beckingham. All rights reserved.