From c663d007192557ca3083656ddfb6f3d73359c94b Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 24 Apr 2023 10:59:33 +0200 Subject: [PATCH] added check to see if dotf was installed --- .functions/todo.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.functions/todo.sh b/.functions/todo.sh index 1d51053..82b0872 100644 --- a/.functions/todo.sh +++ b/.functions/todo.sh @@ -5,8 +5,10 @@ function t(){ } function todo_status(){ - NUM="$(todo.sh lsp "$1" | sed -n 's/.*TODO: \([0-9]\+\).*/\1/p')" - [[ "$NUM" -ne 0 ]] && echo "YES" + if command -v todo.sh > /dev/null; then + NUM="$(todo.sh lsp "$1" | sed -n 's/.*TODO: \([0-9]\+\).*/\1/p')" + [[ "$NUM" -ne 0 ]] && echo "YES" + fi } _todo()