Uniformly use $TODO_SH to refer to script.

Set $TODO_SH to just be $(basename "$0") at the beginning
of the script and use it in all usage messages.

This happens to simplify testing because it allows us to refer to
the script as "todo.sh" in all output.  For general use, if the
user has aliased to file to something else, the usage messages will
still reflect that alias.

Signed-off-by: Emil Sit <sit@emilsit.net>
This commit is contained in:
Emil Sit
2009-04-18 21:11:27 -04:00
parent 825c60514f
commit fee3133547
4 changed files with 21 additions and 20 deletions

View File

@@ -14,7 +14,7 @@ todo.sh add notice the daisies > /dev/null
test_todo_session 'replace usage' <<EOF
>>> todo.sh replace adf asdfa
=== 1
usage: $(which todo.sh) replace ITEM# "UPDATED ITEM"
usage: todo.sh replace ITEM# "UPDATED ITEM"
EOF
test_todo_session 'basic replace' <<EOF