Created
May 10, 2018 00:20
-
-
Save daveyarwood/6128c18c4856961b9f65e32691325e0f to your computer and use it in GitHub Desktop.
Taskwarrior "task ready count" in Bash prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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