Add some debug_messages

This commit is contained in:
Jeremy Gardais 2021-11-18 11:49:54 +01:00
parent 0145fad1d6
commit 1b7b9b4264
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 18 additions and 2 deletions

View File

@ -93,10 +93,26 @@ display_current_task() { # {{{
rm --force -- "${TASKW_CURRENT_LIST}"
## If no task was selected (empty var) then exit
[ -z "${TITLE}" ] && echo "Cancelled." && exit 0
if [ -z "${TITLE}" ]; then
echo "Cancelled."
debug_message "display_current_task \
TITLE var is ${RED}empty${COLOR_DEBUG}."
exit 0
else
debug_message "display_current_task \
TITLE var: ${RED}${TITLE}${RESET}."
fi
## If no ID was found (empty var) then exit
[ -z "${ID}" ] && echo "Cancelled." && exit 0
if [ -z "${ID}" ]; then
echo "Cancelled."
debug_message "display_current_task \
ID var is ${RED}empty${COLOR_DEBUG}."
exit 0
else
debug_message "display_current_task \
ID var: ${RED}${ID}${RESET}."
fi
## Kill any pomodorrior process running for the current task
pkill --full -- "${TITLE}"