Skip to content

Instantly share code, notes, and snippets.

@daveyarwood
Created May 10, 2018 00:20
Show Gist options
  • Save daveyarwood/6128c18c4856961b9f65e32691325e0f to your computer and use it in GitHub Desktop.
Save daveyarwood/6128c18c4856961b9f65e32691325e0f to your computer and use it in GitHub Desktop.
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)"
fi
}
PS1='\u@\h:\w$(tasks_ready) \$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment