diff --git a/tests/t1100-replace.sh b/tests/t1100-replace.sh index 4aee428..33321b1 100755 --- a/tests/t1100-replace.sh +++ b/tests/t1100-replace.sh @@ -88,7 +88,7 @@ EOF test_todo_session 'replace error' << EOF >>> todo.sh replace 10 "hej!" === 1 -10: No such task. +TODO: No task 10. EOF cat /dev/null > todo.txt diff --git a/tests/t1600-append.sh b/tests/t1600-append.sh index c00b0fc..ed3e436 100755 --- a/tests/t1600-append.sh +++ b/tests/t1600-append.sh @@ -41,7 +41,7 @@ EOF test_todo_session 'append error' << EOF >>> todo.sh append 10 "hej!" === 1 -10: No such task. +TODO: No task 10. EOF cat > todo.txt <>> todo.sh depri 42 -42: No such task. +TODO: No task 42. === 1 EOF diff --git a/tests/t1800-del.sh b/tests/t1800-del.sh index 5c150f3..3f70eb2 100755 --- a/tests/t1800-del.sh +++ b/tests/t1800-del.sh @@ -12,11 +12,11 @@ EOF test_todo_session 'del nonexistant item' <>> todo.sh -f del 42 -42: No such task. +TODO: No task 42. === 1 >>> todo.sh -f del 42 Roses -42: No such task. +TODO: No task 42. === 1 EOF @@ -55,7 +55,7 @@ test_todo_session 'del preserving line numbers' <>> todo.sh -f del 1 -1: No such task. +TODO: No task 1. === 1 >>> todo.sh add A new task diff --git a/tests/t9999-testsuite_example.sh b/tests/t9999-testsuite_example.sh index ab8ae23..24df132 100755 --- a/tests/t9999-testsuite_example.sh +++ b/tests/t9999-testsuite_example.sh @@ -110,7 +110,7 @@ usage: todo.sh append ITEM# "TEXT TO APPEND" TODO: 5 of 5 tasks shown >>> todo.sh append 10 "hej!" -10: No such task. +TODO: No task 10. === 1 >>> todo.sh -p list @@ -123,7 +123,7 @@ TODO: 5 of 5 tasks shown TODO: 5 of 5 tasks shown >>> todo.sh do 10 -10: No such task. +TODO: No task 10. === 1 >>> todo.sh -p list diff --git a/todo.sh b/todo.sh index 94dafca..be23f15 100755 --- a/todo.sh +++ b/todo.sh @@ -304,7 +304,7 @@ replaceOrPrepend() [[ "$item" = +([0-9]) ]] || die "$errmsg" todo=$(sed "$item!d" "$TODO_FILE") - [ -z "$todo" ] && die "$item: No such task." + [ -z "$todo" ] && die "TODO: No task $item." if [[ -z "$1" && $TODOTXT_FORCE = 0 ]]; then echo -n "$querytext" @@ -744,7 +744,7 @@ case $action in [ -z "$item" ] && die "$errmsg" [[ "$item" = +([0-9]) ]] || die "$errmsg" todo=$(sed "$item!d" "$TODO_FILE") - [ -z "$todo" ] && die "$item: No such task." + [ -z "$todo" ] && die "TODO: No task $item." if [[ -z "$1" && $TODOTXT_FORCE = 0 ]]; then echo -n "Append: " read input @@ -777,7 +777,7 @@ case $action in [ -z "$item" ] && die "$errmsg" [[ "$item" = +([0-9]) ]] || die "$errmsg" DELETEME=$(sed "$item!d" "$TODO_FILE") - [ -z "$DELETEME" ] && die "$item: No such task." + [ -z "$DELETEME" ] && die "TODO: No task $item." if [ -z "$3" ]; then if [ $TODOTXT_FORCE = 0 ]; then @@ -832,7 +832,7 @@ case $action in for item in `echo $* | tr ',' ' '`; do [[ "$item" = +([0-9]) ]] || die "$errmsg" todo=$(sed "$item!d" "$TODO_FILE") - [ -z "$todo" ] && die "$item: No such task." + [ -z "$todo" ] && die "TODO: No task $item." sed -e $item"s/^(.) //" "$TODO_FILE" > /dev/null 2>&1 @@ -863,7 +863,7 @@ case $action in [[ "$item" = +([0-9]) ]] || die "$errmsg" todo=$(sed "$item!d" "$TODO_FILE") - [ -z "$todo" ] && die "$item: No such task." + [ -z "$todo" ] && die "TODO: No task $item." # Check if this item has already been done if [ `echo $todo | grep -c "^x "` -eq 0 ] ; then