From 9e8334698c3159701c0c292d3ada044e670da1fe Mon Sep 17 00:00:00 2001 From: "Alexander Gehrke (crater2150)" Date: Fri, 22 Mar 2013 13:57:30 +0100 Subject: [PATCH] make the todo call in cd() a hook added conditionally. This way no error is thrown, when the todo program is missing. --- aliases/functions | 3 --- modules/todo/init | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/aliases/functions b/aliases/functions index 6f6af23..730306b 100644 --- a/aliases/functions +++ b/aliases/functions @@ -50,11 +50,8 @@ cd(){ if [ -e ".zin" ]; then . ".zin" fi - todo } - - #}}} ################################################################################# diff --git a/modules/todo/init b/modules/todo/init index ce50e80..0b2843a 100644 --- a/modules/todo/init +++ b/modules/todo/init @@ -8,6 +8,7 @@ if command -v todo >/dev/null; then fi todo ${=file} -f +${1:-high} | wc -l } + chpwd_hook todo else todo_count() { echo -1