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