Cleaned up terms in command error messages.
The messages now consistently use "task"; the use of "todo" is deprecated.
This commit is contained in:
@@ -87,7 +87,7 @@ EOF
|
|||||||
test_todo_session 'replace error' << EOF
|
test_todo_session 'replace error' << EOF
|
||||||
>>> todo.sh replace 10 "hej!"
|
>>> todo.sh replace 10 "hej!"
|
||||||
=== 1
|
=== 1
|
||||||
10: No such todo.
|
10: No such task.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ EOF
|
|||||||
test_todo_session 'append error' << EOF
|
test_todo_session 'append error' << EOF
|
||||||
>>> todo.sh append 10 "hej!"
|
>>> todo.sh append 10 "hej!"
|
||||||
=== 1
|
=== 1
|
||||||
10: No such todo.
|
10: No such task.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ EOF
|
|||||||
|
|
||||||
test_todo_session 'depriority nonexistant item' <<EOF
|
test_todo_session 'depriority nonexistant item' <<EOF
|
||||||
>>> todo.sh depri 42
|
>>> todo.sh depri 42
|
||||||
42: No such todo.
|
42: No such task.
|
||||||
=== 1
|
=== 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ usage: todo.sh append ITEM# "TEXT TO APPEND"
|
|||||||
TODO: 5 of 5 tasks shown
|
TODO: 5 of 5 tasks shown
|
||||||
|
|
||||||
>>> todo.sh append 10 "hej!"
|
>>> todo.sh append 10 "hej!"
|
||||||
10: No such todo.
|
10: No such task.
|
||||||
=== 1
|
=== 1
|
||||||
|
|
||||||
>>> todo.sh -p list
|
>>> todo.sh -p list
|
||||||
@@ -121,7 +121,7 @@ TODO: 5 of 5 tasks shown
|
|||||||
TODO: 5 of 5 tasks shown
|
TODO: 5 of 5 tasks shown
|
||||||
|
|
||||||
>>> todo.sh do 10
|
>>> todo.sh do 10
|
||||||
10: No such todo.
|
10: No such task.
|
||||||
=== 1
|
=== 1
|
||||||
|
|
||||||
>>> todo.sh -p list
|
>>> todo.sh -p list
|
||||||
|
|||||||
12
todo.sh
12
todo.sh
@@ -680,7 +680,7 @@ case $action in
|
|||||||
[ -z "$item" ] && die "$errmsg"
|
[ -z "$item" ] && die "$errmsg"
|
||||||
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
||||||
todo=$(sed "$item!d" "$TODO_FILE")
|
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
|
if [[ -z "$1" && $TODOTXT_FORCE = 0 ]]; then
|
||||||
echo -n "Append: "
|
echo -n "Append: "
|
||||||
read input
|
read input
|
||||||
@@ -734,7 +734,7 @@ case $action in
|
|||||||
echo "TODO: No tasks were deleted."
|
echo "TODO: No tasks were deleted."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "$item: No such todo."
|
echo "$item: No such task."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
sed -i.bak -e $item"s/$3/ /g" "$TODO_FILE"
|
sed -i.bak -e $item"s/$3/ /g" "$TODO_FILE"
|
||||||
@@ -751,7 +751,7 @@ case $action in
|
|||||||
for item in `echo $* | tr ',' ' '`; do
|
for item in `echo $* | tr ',' ' '`; do
|
||||||
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
||||||
todo=$(sed "$item!d" "$TODO_FILE")
|
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
|
sed -e $item"s/^(.) //" "$TODO_FILE" > /dev/null 2>&1
|
||||||
|
|
||||||
@@ -782,7 +782,7 @@ case $action in
|
|||||||
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
||||||
|
|
||||||
todo=$(sed "$item!d" "$TODO_FILE")
|
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
|
# Check if this item has already been done
|
||||||
if [ `echo $todo | grep -c "^x "` -eq 0 ] ; then
|
if [ `echo $todo | grep -c "^x "` -eq 0 ] ; then
|
||||||
@@ -926,7 +926,7 @@ case $action in
|
|||||||
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
||||||
|
|
||||||
todo=$(sed "$item!d" "$TODO_FILE")
|
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
|
if [[ -z "$1" && $TODOTXT_FORCE = 0 ]]; then
|
||||||
echo -n "Prepend: "
|
echo -n "Prepend: "
|
||||||
@@ -998,7 +998,7 @@ note: PRIORITY must be anywhere from A to Z."
|
|||||||
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
[[ "$item" = +([0-9]) ]] || die "$errmsg"
|
||||||
|
|
||||||
todo=$(sed "$item!d" "$TODO_FILE")
|
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
|
# Test for then set priority
|
||||||
if [ `sed "$item!d" "$TODO_FILE"|grep -c "^(\\w)"` -eq 1 ]; then
|
if [ `sed "$item!d" "$TODO_FILE"|grep -c "^(\\w)"` -eq 1 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user