Add todo prompt only, if calendar dir exists
This commit is contained in:
parent
67db15b05b
commit
118704ae78
12
zshrc
12
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
|
||||
|
|
Loading…
Reference in a new issue