From 885ea556294d206b23ae3b7e2f5698e0cfb008bb Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 1 Nov 2017 08:44:20 -0200 Subject: TODO script: aliases and project support --- todo | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'todo') diff --git a/todo b/todo index 0543ca1..568809b 100755 --- a/todo +++ b/todo @@ -66,19 +66,24 @@ if [ "$OPTION" == "find" ]; then todo_find | grep -v -e "^$NAME$" | sed -e "s|^$HOME|~|" elif [ "$OPTION" == "count" ]; then todo_find | grep -v $NAME | wc -l -elif [ "$OPTION" == "show" ]; then +elif [ "$OPTION" == "show" ] || [ "$OPTION" == "see" ] || [ "$OPTION" == "view" ]; then if [ ! -z "$2" ] && [ -e "$2" ]; then # Check TODO inside files grep -i "todo" $2 | sed -e 's/^ *//' # Check also for FIXMEs fixmes $2 + elif cd $2 &> /dev/null; then + ( + cd $2 &> /dev/null + find -maxdepth 1 -xtype f -iname 'todo*' -exec cat {} \; | grep -e '*' -e '-' + ) fi elif [ "$OPTION" == "list" ]; then todo_list $2 elif [ "$OPTION" == "help" ]; then echo "usage: $BASENAME [list|count]" - echo " $BASENAME show " + echo " $BASENAME " else todo_list fi -- cgit v1.2.3