summaryrefslogtreecommitdiff
path: root/functions/fish_prompt.fish
diff options
context:
space:
mode:
Diffstat (limited to 'functions/fish_prompt.fish')
-rw-r--r--functions/fish_prompt.fish14
1 files changed, 8 insertions, 6 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish
index 180359d..b66528a 100644
--- a/functions/fish_prompt.fish
+++ b/functions/fish_prompt.fish
@@ -129,13 +129,15 @@ function prompt_shlv -d "Display level shell"
end
function prompt_todo -d "Display todo"
- set all (todo | wc -l)
- set chkd (todo checked | wc -l)
- set td (math "$all-$chkd")
+ if which todo ^ /dev/null > /dev/null
+ set all (todo | wc -l)
+ set chkd (todo checked | wc -l)
+ set td (math "$all-$chkd")
- if [ $all -gt 0 ]
- prompt_segment 5C5C5C blue "$td/$all"
- end
+ if [ $all -gt 0 ]
+ prompt_segment 5C5C5C blue "$td/$all"
+ end
+ end
end