Skip to content

Instantly share code, notes, and snippets.

Created May 10, 2018 00:20
What would you like to do?
Taskwarrior "task ready count" in Bash prompt
tasks_ready() {
which task >/dev/null || return
tasks_ready=$(task ready 2>/dev/null | grep -E '[0-9]+ tasks?')
if [[ -n "$tasks_ready" ]]; then
echo " ($tasks_ready ready)"
PS1='\u@\h:\w$(tasks_ready) \$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment