From 18f650dc29d7314243dbd33a04e8a32670915115 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 31 Aug 2017 09:06:30 -0300 Subject: TODO script: adds see and help actions --- todo | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'todo') diff --git a/todo b/todo index 1671485..9c62f32 100755 --- a/todo +++ b/todo @@ -49,6 +49,13 @@ if [ "$OPTION" == "list" ]; then todo_find | grep -v -e "^$NAME$" | sed -e "s|^$HOME|~|" elif [ "$OPTION" == "count" ]; then todo_find | grep -v $NAME | wc -l +elif [ "$OPTION" == "see" ]; then + if [ ! -z "$2" ] && [ -e "$2" ]; then + grep "TODO" $2 | sed -e 's/^ *//' + fi +elif [ "$OPTION" == "help" ]; then + echo "usage: $BASENAME [list|count]" + echo " $BASENAME see " else todo_list fi -- cgit v1.2.3