diff --git a/tests/t1100-replace.sh b/tests/t1100-replace.sh index d198bd7..d3e32d3 100755 --- a/tests/t1100-replace.sh +++ b/tests/t1100-replace.sh @@ -14,7 +14,7 @@ todo.sh add notice the daisies > /dev/null test_todo_session 'replace usage' <>> 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' <>> todo.sh pri B B -usage: $HOME/bin/todo.sh pri ITEM# PRIORITY +usage: todo.sh pri ITEM# PRIORITY note: PRIORITY must be anywhere from A to Z. === 1 EOF diff --git a/tests/t9999-testsuite_example.sh b/tests/t9999-testsuite_example.sh index cf841f9..03c7353 100755 --- a/tests/t9999-testsuite_example.sh +++ b/tests/t9999-testsuite_example.sh @@ -92,7 +92,7 @@ TODO: Report file updated. 2009-02-13-04:40:00 5 1 >>> todo.sh append g a -usage: $HOME/bin/todo.sh append ITEM# "TEXT TO APPEND" +usage: todo.sh append ITEM# "TEXT TO APPEND" === 1 >>> todo.sh append 2 and think diff --git a/todo.sh b/todo.sh index 347da47..fc41daa 100755 --- a/todo.sh +++ b/todo.sh @@ -17,13 +17,17 @@ EndVersion exit 1 } -oneline_usage="todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description]" +# Set script name early. +TODO_SH=$(basename "$0") +export TODO_SH + +oneline_usage="$TODO_SH [-fhpantvV] [-d todo_config] action [task_number] [task_description]" usage() { sed -e 's/^ //' <