From 5a5f3bd24d8c47b86854ef23e1550895625031ee Mon Sep 17 00:00:00 2001 From: Jared Cordasco Date: Tue, 13 Apr 2010 10:36:31 -0500 Subject: [PATCH] Tab fixes. --- todo.sh | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/todo.sh b/todo.sh index 79d79ef..3cbebe3 100755 --- a/todo.sh +++ b/todo.sh @@ -262,7 +262,7 @@ cleaninput() action_regexp="^\(append\|app\|prepend\|prep\|replace\)$" # Check which action we are being used in as this affects what cleaning we do - if [ `echo $action | grep -c $action_regexp` -eq 1 ]; then + if [ `echo $action | grep -c $action_regexp` -eq 1 ]; then # These actions use sed and & as the matched string so escape it input=`echo $input | sed 's/\&/\\\&/g'` fi @@ -772,26 +772,26 @@ case $action in # Split multiple do's, if comma seperated change to whitespace sepereated # Loop the 'do' function for each item for item in `echo $* | tr ',' ' '`; do - [ -z "$item" ] && die "$errmsg" - [[ "$item" = +([0-9]) ]] || die "$errmsg" + [ -z "$item" ] && die "$errmsg" + [[ "$item" = +([0-9]) ]] || die "$errmsg" - todo=$(sed "$item!d" "$TODO_FILE") - [ -z "$todo" ] && die "$item: No such todo." + todo=$(sed "$item!d" "$TODO_FILE") + [ -z "$todo" ] && die "$item: No such todo." - # Check if this item has already been done - if [ `echo $todo | grep -c "^x "` -eq 0 ] ; then - now=`date '+%Y-%m-%d'` - # remove priority once item is done - sed -i.bak $item"s/^(.) //" "$TODO_FILE" - sed -i.bak $item"s|^|&x $now |" "$TODO_FILE" - [ $TODOTXT_VERBOSE -gt 0 ] && { - newtodo=$(sed "$item!d" "$TODO_FILE") - echo "$item: $newtodo" - echo "TODO: $item marked as done." - } - else - echo "$item is already marked done" - fi + # Check if this item has already been done + if [ `echo $todo | grep -c "^x "` -eq 0 ] ; then + now=`date '+%Y-%m-%d'` + # remove priority once item is done + sed -i.bak $item"s/^(.) //" "$TODO_FILE" + sed -i.bak $item"s|^|&x $now |" "$TODO_FILE" + [ $TODOTXT_VERBOSE -gt 0 ] && { + newtodo=$(sed "$item!d" "$TODO_FILE") + echo "$item: $newtodo" + echo "TODO: $item marked as done." + } + else + echo "$item is already marked done" + fi done if [ $TODOTXT_AUTO_ARCHIVE = 1 ]; then