Changed odd tabs to spaces.

This commit is contained in:
Jared Cordasco
2010-01-05 15:25:31 -05:00
parent 0a7e6337b2
commit d337933fd9

36
todo.sh
View File

@@ -262,7 +262,7 @@ cleaninput()
if [[ $action =~ '^(append|app|prepend|prep|replace)$' ]]; then
# These actions use sed and & as the matched string so escape it
input=`echo $input | sed 's/\&/\\\&/g'`
fi
fi
}
archive()
@@ -755,12 +755,12 @@ case $action in
"do" )
errmsg="usage: $TODO_SH do ITEM#"
# shift so we get arguments to the do request
shift;
# shift so we get arguments to the do request
shift;
# Split multiple do's, if comma seperated change to whitespace sepereated
# Loop the 'do' function for each item
for item in `echo $* | tr ',' ' '`; do
# 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"
@@ -779,7 +779,7 @@ case $action in
else
echo "$item is already marked done"
fi
done
done
if [ $TODOTXT_AUTO_ARCHIVE = 1 ]; then
archive
@@ -911,28 +911,28 @@ case $action in
fi
cleaninput $input
# Test for then set priority
if [ `sed "$item!d" "$TODO_FILE"|grep -c "^(\\w)"` -eq 1 ]; then
priority=$(sed "$item!d" "$TODO_FILE" | awk -F '\\(|\\)' '{print $2}')
fi
# Test for then set priority
if [ `sed "$item!d" "$TODO_FILE"|grep -c "^(\\w)"` -eq 1 ]; then
priority=$(sed "$item!d" "$TODO_FILE" | awk -F '\\(|\\)' '{print $2}')
fi
# If priority isn't set prepend
if [ -z $priority ]; then
# If priority isn't set prepend
if [ -z $priority ]; then
if sed -i.bak $item" s|^.*|$input &|" "$TODO_FILE"; then
newtodo=$(sed "$item!d" "$TODO_FILE")
[ $TODOTXT_VERBOSE -gt 0 ] && echo "$item: $newtodo"
else
echo "TODO: Error prepending task $item."
fi
# If priority is set, remove priority, prepend and add back priority
else
if sed -i.bak -e "$item s/^(.) //" -e "$item s|^.*|\($priority\) $1 &|" "$TODO_FILE"; then
fi
# If priority is set, remove priority, prepend and add back priority
else
if sed -i.bak -e "$item s/^(.) //" -e "$item s|^.*|\($priority\) $1 &|" "$TODO_FILE"; then
newtodo=$(sed "$item!d" "$TODO_FILE")
[ $TODOTXT_VERBOSE -gt 0 ] && echo "$item: $newtodo"
else
echo "TODO: Error prepending task $item."
fi
fi
fi
cleanup;;
"pri" | "p" )