Printing usage message if no ITEM# given to "todo.sh do".

This commit is contained in:
Ingo Karkat
2010-05-25 10:10:09 +02:00
parent edac86a94d
commit 9e5e6aef39
2 changed files with 7 additions and 0 deletions

View File

@@ -768,6 +768,7 @@ case $action in
errmsg="usage: $TODO_SH do ITEM#[, ITEM#, ITEM#, ...]"
# shift so we get arguments to the do request
shift;
[ "$#" -eq 0 ] && die "$errmsg"
# Split multiple do's, if comma seperated change to whitespace sepereated
# Loop the 'do' function for each item