基於命令列的工作管理員 Taskwarrior

lanyu發表於2021-09-09

Taskwarrior 是一個靈活的,用他們:

Taskwarrior 在命令列裡管理你的 TODO 列表。它靈活,快速,高效,不顯眼,它默默做自己的事情讓你避免自己管理。

Taskwarrior 是高度可定製的,但也可以“立即使用”。在本文中,我們將向你展示新增和完成任務的基本命令,然後我們將介紹幾個更高階的命令。最後,我們將向你展示一些基本的配置設定,以開始自定義你的設定。

Taskwarrior 在 Fedora 倉庫中是可用的,所有安裝它很容易:

sudo dnf install task

一旦完成安裝,執行 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 wheatCreated task 1.

執行 task 或者 task list 來顯示即將來臨的任務。

$ task listID Age Description Urg 1 8s Plant the wheat 01 task

讓我們新增一些任務來完成這個示例。

$ task add Tend the wheatCreated task 2.
$ task add Cut the wheatCreated task 3.
$ task add Take the wheat to the mill to be ground into flourCreated task 4.
$ task add Bake a cakeCreated task 5.

再次執行 task 來檢視列表。

[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 05 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.

透過使用 addlistdone,你可以說已經入門了。

很多工不需要一個截止日期:

task add Finish the article on Taskwarrior

但是有時候,設定一個截止日期正是你需要提高效率的動力。在新增任務時使用 due 修飾符來設定特定的截止日期。

task add Finish the article on Taskwarrior due:tomorrow

due 非常靈活。它接受特定日期 (2017-02-02) 或 ISO-8601 (2017-02-02T20:53:00Z),甚至相對時間 (8hrs)。可以檢視所有示例的 文件。

日期也不只有截止日期,Taskwarrior 有 scheduled, waituntil 選項。

task add Proof the article on Taskwarrior scheduled:thurs

一旦日期(本例中的星期四)透過,該任務就會被標記為 READY 虛擬標記。它會顯示在 ready 報告中。

$ task ready

ID Age S Description Urg 1 2s 1d Proof the article on Taskwarrior 5

要移除一個日期,使用空白值來 modify 任務:

$ 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 12 tasks

記得我們在開頭建立的檔案 (~/.taskrc)嗎?讓我們來看看預設設定:

# [Created by task 2.5.1 2/9/2017 16:39:14]# Taskwarrior program configuration file.# For more documentation, see  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# Filesdata.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 noAre you sure you want to add 'displayweeknumber' with a value of 'no'? (yes/no) yesConfig 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

務必閱讀以瞭解你可以編目和組織任務的所有方式。


via:

作者: 譯者: 校對:


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/2035/viewspace-2801170/,如需轉載,請註明出處,否則將追究法律責任。

相關文章