aboutsummaryrefslogtreecommitdiff
path: root/todo
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-08-31 09:06:30 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-08-31 09:06:30 -0300
commit18f650dc29d7314243dbd33a04e8a32670915115 (patch)
tree9bf4954b43e6927b56fc4ae74d35c2ea4d1f83ce /todo
parentf048e0b620819549e2cf28c2efa57620870928cc (diff)
downloadscripts-18f650dc29d7314243dbd33a04e8a32670915115.tar.gz
scripts-18f650dc29d7314243dbd33a04e8a32670915115.tar.bz2
TODO script: adds see and help actions
Diffstat (limited to 'todo')
-rwxr-xr-xtodo7
1 files changed, 7 insertions, 0 deletions
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 <file>"
else
todo_list
fi