Cleaned up terms in command error messages.

The messages now consistently use "task"; the use of "todo" is deprecated.
This commit is contained in:
Ingo Karkat
2010-05-27 15:48:37 +02:00
parent 8bddb08196
commit 8ff3a7ce4a
5 changed files with 11 additions and 11 deletions

View File

@@ -87,7 +87,7 @@ EOF
test_todo_session 'replace error' << EOF
>>> todo.sh replace 10 "hej!"
=== 1
10: No such todo.
10: No such task.
EOF
test_done

View File

@@ -41,7 +41,7 @@ EOF
test_todo_session 'append error' << EOF
>>> todo.sh append 10 "hej!"
=== 1
10: No such todo.
10: No such task.
EOF
test_done

View File

@@ -12,7 +12,7 @@ EOF
test_todo_session 'depriority nonexistant item' <<EOF
>>> todo.sh depri 42
42: No such todo.
42: No such task.
=== 1
EOF

View File

@@ -108,7 +108,7 @@ usage: todo.sh append ITEM# "TEXT TO APPEND"
TODO: 5 of 5 tasks shown
>>> todo.sh append 10 "hej!"
10: No such todo.
10: No such task.
=== 1
>>> todo.sh -p list
@@ -121,7 +121,7 @@ TODO: 5 of 5 tasks shown
TODO: 5 of 5 tasks shown
>>> todo.sh do 10
10: No such todo.
10: No such task.
=== 1
>>> todo.sh -p list

12
todo.sh
View File

@@ -680,7 +680,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 todo."
[ -z "$todo" ] && die "$item: No such task."
if [[ -z "$1" && $TODOTXT_FORCE = 0 ]]; then
echo -n "Append: "
read input
@@ -734,7 +734,7 @@ case $action in
echo "TODO: No tasks were deleted."
fi
else
echo "$item: No such todo."
echo "$item: No such task."
fi
else
sed -i.bak -e $item"s/$3/ /g" "$TODO_FILE"
@@ -751,7 +751,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 todo."
[ -z "$todo" ] && die "$item: No such task."
sed -e $item"s/^(.) //" "$TODO_FILE" > /dev/null 2>&1
@@ -782,7 +782,7 @@ case $action in
[[ "$item" = +([0-9]) ]] || die "$errmsg"
todo=$(sed "$item!d" "$TODO_FILE")
[ -z "$todo" ] && die "$item: No such todo."
[ -z "$todo" ] && die "$item: No such task."
# Check if this item has already been done
if [ `echo $todo | grep -c "^x "` -eq 0 ] ; then
@@ -926,7 +926,7 @@ case $action in
[[ "$item" = +([0-9]) ]] || die "$errmsg"
todo=$(sed "$item!d" "$TODO_FILE")
[ -z "$todo" ] && die "$item: No such todo."
[ -z "$todo" ] && die "$item: No such task."
if [[ -z "$1" && $TODOTXT_FORCE = 0 ]]; then
echo -n "Prepend: "
@@ -998,7 +998,7 @@ note: PRIORITY must be anywhere from A to Z."
[[ "$item" = +([0-9]) ]] || die "$errmsg"
todo=$(sed "$item!d" "$TODO_FILE")
[ -z "$todo" ] && die "$item: No such todo."
[ -z "$todo" ] && die "$item: No such task."
# Test for then set priority
if [ `sed "$item!d" "$TODO_FILE"|grep -c "^(\\w)"` -eq 1 ]; then