todotxt-addons/pantop

14 lines
371 B
Bash
Executable File

#!/bin/bash
[ "$1" = "usage" ] && exit 0
shift
text="$("$TODO_FULL_SH" -p ls | head -n1)"
pri="PRI_$(sed -r 's/^[0-9]+ \(([A-Z])\).*/\1/' <<< "$text")"
text="${!pri}$text$DEFAULT"
text="$(sed -r 's` (\+[^ $]*)` '"$COLOR_PROJECT"'\1'"$DEFAULT"'`' <<< "$text")"
text="$(sed -r 's` (@[^ $]*)` '"$COLOR_CONTEXT"'\1'"$DEFAULT"'`' <<< "$text")"
echo '<txt>'"$text"'</txt>'