Taskwarrior 是一个灵活的 命令行任务管理程序. 在他们的 自己的话:
Taskwarrior 从您的命令行管理您的 TODO 列表。 它灵活、快速、高效、不显眼,可以完成它的工作,然后让你摆脱困境。
Taskwarrior 是高度可定制的,但也可以“开箱即用”。 在本文中,我们将向您展示添加和完成任务的基本命令。 然后我们将介绍一些更高级的命令。 最后,我们将向您展示一些基本配置设置,以开始自定义您的设置。
安装任务战士
Taskwarrior 可在 Fedora 存储库,因此安装它很简单:
sudo dnf install task
安装后,运行任务。 第一次运行将为您创建一个 ~/.taskrc 文件。
$ task A configuration file could not be found in ~ Would you like a sample /home/link/.taskrc created, so Taskwarrior can proceed? (yes/no) yes [task next] No matches.
添加任务
添加任务快速且不显眼。
$ task add Plant the wheat Created task 1.
运行任务或任务列表以显示即将执行的任务。
$ task list ID Age Description Urg 1 8s Plant the wheat 0 1 task
让我们添加更多任务来完善 example.
$ task add Tend the wheat Created task 2. $ task add Cut the wheat Created task 3. $ task add Take the wheat to the mill to be ground into flour Created task 4. $ task add Bake a cake Created task 5.
再次运行任务以查看列表。
[task next] ID Age Description Urg 1 3min Plant the wheat 0 2 22s Tend the wheat 0 3 16s Cut the wheat 0 4 8s Take the wheat to the mill to be ground into flour 0 5 2s Bake a cake 0 5 tasks
完成任务
要将任务标记为完成,请查找其 ID 并运行:
$ task 1 done Completed task 1 'Plant the wheat'. Completed 1 task.
您还可以使用其描述标记任务已完成。
$ task 'Tend the wheat' done Completed task 1 'Tend the wheat'. Completed 1 task.
通过添加、列出和完成,您已准备好开始使用 Taskwarrior。
设置截止日期
许多任务不需要截止日期:
task add Finish the article on Taskwarrior
但有时,设定截止日期正是您提高工作效率所需的一种动力。 添加任务时使用到期修饰符来设置特定的截止日期。
task add Finish the article on Taskwarrior due:tomorrow
由于是高度灵活的。 它接受特定日期(“2017-02-02”)或 ISO-8601(“2017-02-02T20:53:00Z”),甚至是相对时间(“8hrs”)。 见 约会时间 所有示例的文档。
日期也超过了截止日期。 Taskwarrior 已安排、等待和直到。
task add Proof the article on Taskwarrior scheduled:thurs
一旦日期(星期四在这个 example) 通过,任务被标记为 READY 虚拟标签。 然后它将显示在准备好的报告中。
$ task ready ID Age S Description Urg 1 2s 1d Proof the article on Taskwarrior 5
要删除日期,请使用空白值修改任务:
$ task 1 modify scheduled:
搜索任务
没有使用正则表达式搜索的能力,没有任务列表是完整的,对吧?
$ task '/.* the wheat/' list ID Age Project Description Urg 2 42min Take the wheat to the mill to be ground into flour 0 1 42min Home Cut the wheat 1 2 tasks
自定义任务战士
请记住我们在开始时创建的文件 (~/.taskrc)。 让我们采用默认值:
# [Created by task 2.5.1 2/9/2017 16:39:14] # Taskwarrior program configuration file. # For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color', # 'man task-sync' or 'man taskrc' # Here is an example of entries that use the default, override and blank values # variable=foo -- By specifying a value, this overrides the default # variable= -- By specifying no value, this means no default # #variable=foo -- By commenting out the line, or deleting it, this uses the default # Use the command 'task show' to see all defaults and overrides # Files data.location=~/.task # Color theme (uncomment one to use) #include /usr//usr/share/task/light-16.theme #include /usr//usr/share/task/light-256.theme #include /usr//usr/share/task/dark-16.theme #include /usr//usr/share/task/dark-256.theme #include /usr//usr/share/task/dark-red-256.theme #include /usr//usr/share/task/dark-green-256.theme #include /usr//usr/share/task/dark-blue-256.theme #include /usr//usr/share/task/dark-violets-256.theme #include /usr//usr/share/task/dark-yellow-green.theme #include /usr//usr/share/task/dark-gray-256.theme #include /usr//usr/share/task/dark-gray-blue-256.theme #include /usr//usr/share/task/solarized-dark-256.theme #include /usr//usr/share/task/solarized-light-256.theme #include /usr//usr/share/task/no-color.theme
目前唯一有效的选项是 data.location=~/.task。 要查看活动配置设置(包括内置默认设置),请运行 show。
task show
要更改设置,请使用 config。
$ task config displayweeknumber no Are you sure you want to add 'displayweeknumber' with a value of 'no'? (yes/no) yes Config file /home/link/.taskrc modified.
例子
这些只是您可以使用 Taskwarrior 做的一些事情。
为您的任务分配一个项目:
task 'Fix leak in the roof' modify project:Home
使用 start 标记您正在处理的内容。 这可以帮助您记住周末之后的工作:
task 'Fix bug #141291' start
使用相关标签:
task add 'Clean gutters' +weekend +house
请务必阅读 完整的文档 了解可以对任务进行分类和组织的所有方法。