diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-08-31 09:06:30 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-08-31 09:06:30 -0300 |
commit | 18f650dc29d7314243dbd33a04e8a32670915115 (patch) | |
tree | 9bf4954b43e6927b56fc4ae74d35c2ea4d1f83ce /todo | |
parent | f048e0b620819549e2cf28c2efa57620870928cc (diff) | |
download | scripts-18f650dc29d7314243dbd33a04e8a32670915115.tar.gz scripts-18f650dc29d7314243dbd33a04e8a32670915115.tar.bz2 |
TODO script: adds see and help actions
Diffstat (limited to 'todo')
-rwxr-xr-x | todo | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |