mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00

- Added support for displaying color samples. If you run the command 'task color red on grey12' then task will show you a sample of this color, along with other examples. This is helpful if you are trying to choose colors for auto colorization rules.
413 lines
9.3 KiB
Groff
413 lines
9.3 KiB
Groff
.TH task-tutorial 5 2009-09-07 "task 1.9.0" "User Manuals"
|
|
|
|
.SH NAME
|
|
task-tutorial \- A tutorial for the task(1) command line todo manager.
|
|
|
|
.SH DESCRIPTION
|
|
Task is a command line TODO list manager. It maintains a list of tasks that you
|
|
want to do, allowing you to add/remove, and otherwise manipulate them. Task
|
|
has a rich list of commands that allow you to do various things with it.
|
|
|
|
.SH 30 second tutorial
|
|
|
|
For the excessively lazy. Add two tasks:
|
|
.br
|
|
.RS
|
|
$ task add Read task documents later
|
|
.br
|
|
$ task add priority:H Pay bills
|
|
.RE
|
|
|
|
Easy. See that second one has a High priority? Now let's look at those tasks:
|
|
.br
|
|
.RS
|
|
$ task ls
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
2 H Pay bills
|
|
.br
|
|
1 Read task documents later
|
|
.RE
|
|
|
|
They are ordered by priority. Let's mark number 2 as done:
|
|
.br
|
|
.RS
|
|
$ task 2 done
|
|
.br
|
|
$ task ls
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
1 Read task documents later
|
|
.RE
|
|
|
|
Gone. Now let's delete that remaining task, because, well, why bother
|
|
now we are already using task:
|
|
.br
|
|
.RS
|
|
$ task delete 1
|
|
.br
|
|
$ task ls
|
|
.br
|
|
No matches
|
|
.RE
|
|
|
|
That's how easy managing your task list can be. But now consider learning what
|
|
task can really do...
|
|
|
|
.SH Simple usage of task
|
|
Let us begin by adding some tasks:
|
|
.br
|
|
.RS
|
|
$ task add Book plane ticket
|
|
.br
|
|
$ task add Rent a tux
|
|
.br
|
|
$ task add Reserve a rental car
|
|
.br
|
|
$ task add Reserve a hotel room
|
|
.RE
|
|
|
|
You'll notice immediately that task has a very minimalist interface. Let us take
|
|
a look at those tasks:
|
|
.br
|
|
.RS
|
|
$ task ls
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
1 Book plane ticket
|
|
.br
|
|
2 Rent a tux
|
|
.br
|
|
3 Reserve a rental car
|
|
.br
|
|
4 Send John a birthday card
|
|
.RE
|
|
|
|
The 'ls' command provides the most minimal list of tasks. Each task has
|
|
been given an id number, and you can see that there are no projects or
|
|
priorities assigned. Wait a minute - I own a tux, I don't need to rent
|
|
one. Let us delete task 2:
|
|
.br
|
|
.RS
|
|
$ task 2 delete
|
|
.br
|
|
Permanently delete task? (y/n) y
|
|
.RE
|
|
|
|
Task wants you to confirm deletions. To suppress the confirmation, edit your
|
|
.taskrc file and change the line:
|
|
.br
|
|
.RS
|
|
confirmation=yes
|
|
.RE
|
|
.br
|
|
to have a value of "no". If the entry is not there, then add it.
|
|
|
|
While the use of projects and priorities are not essential, they can be very
|
|
useful when the list of tasks grows large. Let's assign projects to these
|
|
tasks:
|
|
.br
|
|
.RS
|
|
$ task 1 project:Wedding
|
|
.br
|
|
$ task 3 project:Wedding
|
|
.br
|
|
$ task 4 project:Family
|
|
.br
|
|
$ task ls
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
3 Family Send John a birthday card
|
|
.br
|
|
2 Wedding Reserve a rental car
|
|
.br
|
|
1 Wedding Book plane ticket
|
|
.RE
|
|
|
|
Notice that the id numbers have changed. When tasks get deleted, or have
|
|
their attributes changed (project, for example), the ids are prone to change.
|
|
But the id numbers will remain valid until the next 'ls' command is run.
|
|
You should only use the ids from the most recent 'ls' command. The ids change,
|
|
because task is always trying to use small numbers so that it is easy for you
|
|
to enter them correctly. Now that projects are assigned, we can look at just
|
|
the Wedding project tasks:
|
|
|
|
Subprojects are supported. If you have a project "Wedding", you can specify
|
|
that a task is a subproject "Transport" of "Wedding" by assigning the project
|
|
"Wedding.Transport". Let's do this:
|
|
.br
|
|
.RS
|
|
$ task 2 project:Wedding.Transport
|
|
.br
|
|
$ task ls
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
3 Family Send John a birthday card
|
|
.br
|
|
2 Wedding.Transport Reserve a rental car
|
|
.br
|
|
1 Wedding Book plane ticket
|
|
.RE
|
|
|
|
Task matches the leftmost part of the project when searching, so projects may be
|
|
abbreviated:
|
|
.br
|
|
.RS
|
|
$ task ls project:Wedding.Tra
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
2 Wedding.Transport Reserve a rental car
|
|
.RE
|
|
|
|
This way of matching projects can be used to see all tasks under the "Wedding"
|
|
project and all subprojects:
|
|
.br
|
|
.RS
|
|
$ task ls project:Wedding
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
2 Wedding.Transport Reserve a rental car
|
|
.br
|
|
1 Wedding Book plane ticket
|
|
.RE
|
|
|
|
Let's reassign 2 back to the "Wedding" project:
|
|
.br
|
|
.RS
|
|
$ task 2 project:Wedding
|
|
.RE
|
|
|
|
Now that projects are assigned, we can look at just the Wedding project tasks:
|
|
.br
|
|
.RS
|
|
$ task ls project:Wedding
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
1 Wedding Book plane ticket
|
|
.br
|
|
2 Wedding Reserve a rental car
|
|
.RE
|
|
|
|
Any command arguments after the 'ls' are used for filtering the output.
|
|
We could also have requested:
|
|
.br
|
|
.RS
|
|
$ task ls ticket plane
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
1 Wedding Book plane ticket
|
|
.RE
|
|
|
|
Now let's prioritize. Priorities can be H, M or L (High, Medium, Low).
|
|
.br
|
|
.RS
|
|
$ task ls
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
3 Family Send John a birthday card
|
|
.br
|
|
2 Wedding Reserve a rental car
|
|
.br
|
|
1 Wedding Book plane ticket
|
|
.br
|
|
$ task 1 priority:H
|
|
.br
|
|
$ task 2 prior:M
|
|
.br
|
|
$ task 3 pr:H
|
|
.br
|
|
Ambiguous attribute 'pr' - could be either of project, priority
|
|
.br
|
|
$ task 3 pri:H
|
|
.br
|
|
$ task ls
|
|
.br
|
|
ID Project Pri Description
|
|
.br
|
|
3 Family H Send John a birthday card
|
|
.br
|
|
1 Wedding H Book plane ticket
|
|
.br
|
|
2 Wedding M Reserve a rental car
|
|
.RE
|
|
|
|
Notice that task supports the abbreviation of words such as priority and
|
|
project. Priority can be abbreviated to pri, but not pr, because it is
|
|
ambiguous. Now that tasks have been prioritized, you can see that the tasks are
|
|
being sorted by priority, with the highest priority tasks at the top.
|
|
|
|
These attributes can all be provided when the task is added, instead of applying
|
|
them afterwards, as shown. The following command shows how to set all the
|
|
attributes at once:
|
|
.br
|
|
.RS
|
|
$ task add project:Wedding priority:H Book plane ticket
|
|
.RE
|
|
|
|
The sequence of those arguments is not important, so you could have entered the
|
|
following command instead:
|
|
.br
|
|
.RS
|
|
$ task project:Wedding add Book plane priority:H ticket
|
|
.RE
|
|
|
|
This is because task knows what attributes look like (name:value), knows what
|
|
commands it supports (add, ...), and just assumes the rest is part of the
|
|
description. Incidentally, if you wanted 'priority:H' to be part of your task
|
|
description, you need to fool task into ignoring it as an attribute. That can
|
|
be done in two ways:
|
|
.br
|
|
.RS
|
|
$ task add "quoting makes task consider priority:H part of one big argument"
|
|
$ task add -- the hyphens make task treat everything after it as description
|
|
.RE
|
|
|
|
The 'ls' command provides the least information for each task. The 'list'
|
|
command provides more:
|
|
.br
|
|
.RS
|
|
$ task list
|
|
.br
|
|
ID Project Pri Due Active Age Description
|
|
.br
|
|
3 Family H 4 mins Send John a birthday card
|
|
.br
|
|
1 Wedding H 5 mins Book plane ticket
|
|
.br
|
|
2 Wedding M 5 mins Reserve a rental car
|
|
.RE
|
|
|
|
Notice that a task can have a due date, and can be active. The task lists are
|
|
sorted by due date, then priority. Let's add due dates:
|
|
.br
|
|
.RS
|
|
$ task 3 due:6/25/2008
|
|
.br
|
|
$ task 1 due:7/31/2008
|
|
.br
|
|
$ task list
|
|
.br
|
|
ID Project Pri Due Active Age Description
|
|
.br
|
|
3 Family H 6/25/2008 6 mins Send John a birthday card
|
|
.br
|
|
1 Wedding H 7/31/2008 7 mins Book plane ticket
|
|
.br
|
|
2 Wedding M 7 mins Reserve a rental car
|
|
.RE
|
|
|
|
If today's date is 6/23/2008, then task 3 is due in 2 days. It will be colored
|
|
yellow if your terminal supports color. To change this color, edit your .taskrc
|
|
file, and change the line to one of these alternatives:
|
|
.br
|
|
.RS
|
|
color.due=red
|
|
.br
|
|
color.due=on blue
|
|
.br
|
|
color.due=red on blue
|
|
.br
|
|
color.due=bold red on blue
|
|
.RE
|
|
|
|
Where color is one of the following:
|
|
|
|
.br
|
|
.RS
|
|
black, blue, red, green, cyan, magenta, yellow or white
|
|
.RE
|
|
|
|
All colors are specified in this way. Take a look in .taskrc for all the other
|
|
color rules that you control, and run 'task color' to see samples of all
|
|
supported colors.
|
|
|
|
Tagging tasks is a good way to group them, aside from specifying a project.
|
|
To add a tag to a task:
|
|
.br
|
|
.RS
|
|
$ task <id> +tag
|
|
.RE
|
|
|
|
The plus sign indicates that this is a tag. Any number of tags may be applied to a
|
|
task, and then used for searching. Tags are just single words that are labels.
|
|
.br
|
|
.RS
|
|
$ task list
|
|
.br
|
|
ID Project Pri Due Active Age Description
|
|
.br
|
|
3 Family H 6/25/2008 8 mins Send John a birthday card
|
|
.br
|
|
1 Wedding H 7/31/2008 9 mins Book plane ticket
|
|
.br
|
|
2 Wedding M 9 mins Reserve a rental car
|
|
.br
|
|
$ task 1 +phone
|
|
.br
|
|
$ task 2 +phone
|
|
.br
|
|
$ task 3 +shopping
|
|
.br
|
|
$ task 3 +john
|
|
.br
|
|
$ task list +phone
|
|
.br
|
|
ID Project Pri Due Active Age Description
|
|
.br
|
|
1 Wedding H 7/31/2008 9 mins Book plane ticket
|
|
.br
|
|
2 Wedding M 9 mins Reserve a rental car
|
|
.RE
|
|
|
|
To remove a tag from a task, use the minus sign:
|
|
.br
|
|
.RS
|
|
$ task 3 \-john
|
|
.RE
|
|
|
|
.SH Advanced usage of task
|
|
Advanced examples of the usage of task can be found at the official site at
|
|
<http://taskwarrior.org>
|
|
|
|
.SH "CREDITS & COPYRIGHTS"
|
|
task was written by P. Beckingham <paul@beckingham.net>.
|
|
.br
|
|
Copyright (C) 2006 \- 2010 P. Beckingham
|
|
|
|
This man page was originally written by Federico Hernandez.
|
|
|
|
task is distributed under the GNU General Public License. See
|
|
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
|
|
|
|
.SH SEE ALSO
|
|
.BR task(1),
|
|
.BR taskrc(5)
|
|
|
|
For more information regarding task, the following may be referenced:
|
|
|
|
.TP
|
|
The official site at
|
|
<http://taskwarrior.org>
|
|
|
|
.TP
|
|
The official code repository at
|
|
<http://github.com/pbeckingham/task/>
|
|
|
|
.TP
|
|
You can contact the project by writing an email to
|
|
<support@taskwarrior.org>
|
|
|
|
.SH REPORTING BUGS
|
|
.TP
|
|
Bugs in task may be reported to the issue-tracker at
|
|
<http://taskwarrior.org>
|