prompt todo: handle duplicates
This commit is contained in:
parent
cfe15e5e1b
commit
cbf1edac22
1 changed files with 2 additions and 2 deletions
4
zshrc
4
zshrc
|
@ -102,8 +102,8 @@ exists thefuck && eval $(thefuck --alias)
|
||||||
|
|
||||||
if [[ -e $HOME/.calendars ]]; then
|
if [[ -e $HOME/.calendars ]]; then
|
||||||
_prompt_todos() {
|
_prompt_todos() {
|
||||||
local todos=$(rg -l '^STATUS:NEEDS-ACTION' $HOME/.calendars | wc -l)
|
local todos=( ${(u)$( rg -l '^STATUS:NEEDS-ACTION' $HOME/.calendars ):t} )
|
||||||
[[ $todos -gt 0 ]] && echo "Todos: $todos"
|
[[ $#todos -gt 0 ]] && echo "Todos: $#todos"
|
||||||
}
|
}
|
||||||
__chromaz_extra_left+=_prompt_todos
|
__chromaz_extra_left+=_prompt_todos
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue