aboutsummaryrefslogtreecommitdiff
path: root/todo
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-01 08:44:20 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-01 08:44:20 -0200
commit885ea556294d206b23ae3b7e2f5698e0cfb008bb (patch)
treee29c63d927820eee00707d669ce46ce2705ebc20 /todo
parent96cc6fc7d34daf8c2d4c3dbf757f27d6cc8c69c5 (diff)
downloadscripts-885ea556294d206b23ae3b7e2f5698e0cfb008bb.tar.gz
scripts-885ea556294d206b23ae3b7e2f5698e0cfb008bb.tar.bz2
TODO script: aliases and project support
Diffstat (limited to 'todo')
-rwxr-xr-xtodo9
1 files changed, 7 insertions, 2 deletions
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 <file>"
+ echo " $BASENAME <show|see|view> <file|project>"
else
todo_list
fi