bail if todo not installed

This commit is contained in:
Daylin Morgan 2025-01-09 14:40:44 -06:00
parent 7c86d8ead3
commit 40201204ed
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -1712,6 +1712,7 @@
} }
function prompt_mytodo() { function prompt_mytodo() {
(( $+commands[todo] )) || return
[ -f "todo.md" ] || return [ -f "todo.md" ] || return
local todo_status="$(HWYLTERM_FORCE_COLOR=1 todo show --status --totals)" local todo_status="$(HWYLTERM_FORCE_COLOR=1 todo show --status --totals)"
p10k segment -t "%f$(_enclose_ansi $todo_status)" p10k segment -t "%f$(_enclose_ansi $todo_status)"