From 6fe1bd3e0c260e52d614b33162ceb3cc5a519fc6 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Fri, 12 Nov 2021 12:49:44 +0100 Subject: [PATCH] . --- .functions/ps1.sh | 2 +- .functions/todo.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .functions/todo.sh diff --git a/.functions/ps1.sh b/.functions/ps1.sh index 0bee62c..5e9467a 100644 --- a/.functions/ps1.sh +++ b/.functions/ps1.sh @@ -19,7 +19,7 @@ function set_bash_prompt () { local COLOR_PATH="\033[0;37m" local COLOR_EXIT_STATUS="[\033[1;37m\033[41m" local COLOR_KUBERNETES="\033[1;37m\033[44m" - local COLOR_TODO="'\033[1;30m''\033[43m'" + local COLOR_TODO="\033[1;30m\033[43m" local COLOR_DOTF="\033[1;37m\033[45m" local CURRENT_CONTEXT="" diff --git a/.functions/todo.sh b/.functions/todo.sh new file mode 100644 index 0000000..6265474 --- /dev/null +++ b/.functions/todo.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +function t(){ + todo.sh "$@" +} + +function todo_status(){ + NUM="$(todo.sh lsp "$1" | sed -n 's/.*TODO: \([0-9]\+\).*/\1/p')" + [[ "$NUM" -ne 0 ]] && echo "YES" +}