Add todo prompt only, if calendar dir exists

This commit is contained in:
root 2021-07-24 23:12:48 +02:00 committed by crater2150
parent 67db15b05b
commit 118704ae78

12
zshrc
View file

@ -81,8 +81,10 @@ fi
exists thefuck && eval $(thefuck --alias) exists thefuck && eval $(thefuck --alias)
_prompt_todos() { if [[ -e $HOME/.calendars ]]; then
local todos=$(rg -l '^STATUS:NEEDS-ACTION' $HOME/.calendars | wc -l) _prompt_todos() {
[[ $todos -gt 0 ]] && echo "Todos: $todos" local todos=$(rg -l '^STATUS:NEEDS-ACTION' $HOME/.calendars | wc -l)
} [[ $todos -gt 0 ]] && echo "Todos: $todos"
__chromaz_extra_left+=_prompt_todos }
__chromaz_extra_left+=_prompt_todos
fi