diff --git a/actions/contextview/contextview b/actions/contextview/contextview index 8b3f0ae..7660e79 100755 --- a/actions/contextview/contextview +++ b/actions/contextview/contextview @@ -11,7 +11,7 @@ shift # Stop filter now and run in a controlled manner after the _list function is run TODOTXT_DISABLE_FILTER=1 -[ "$action" = "useage" ] && { +[ "$action" = "usage" ] && { echo " $(basename $0) [TERM...]" echo " Show todo items containing TERM, grouped by context, and displayed in" echo " priority order. If no TERM provided, displays entire todo.txt." diff --git a/actions/contextview/cv b/actions/contextview/cv index 7193cd4..61788f0 100755 --- a/actions/contextview/cv +++ b/actions/contextview/cv @@ -1,6 +1,6 @@ #!/usr/bin/env bash -[ "$1" = "useage" ] && exit 0 +[ "$1" = "usage" ] && exit 0 shift "$TODO_SH" contextview "$@" diff --git a/actions/enotes/ena b/actions/enotes/ena index 9366fc5..0c1a743 100755 --- a/actions/enotes/ena +++ b/actions/enotes/ena @@ -2,8 +2,8 @@ action=$1 shift -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" enotesarchive useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" enotesarchive usage else "$TODO_FULL_SH" enotesarchive "$@" fi diff --git a/actions/enotes/enc b/actions/enotes/enc index 0096275..a62baec 100755 --- a/actions/enotes/enc +++ b/actions/enotes/enc @@ -2,8 +2,8 @@ action=$1 shift -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" enotescat useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" enotescat usage else "$TODO_FULL_SH" enotescat "$@" fi diff --git a/actions/enotes/ene b/actions/enotes/ene index 74bda2c..270b70a 100755 --- a/actions/enotes/ene +++ b/actions/enotes/ene @@ -2,8 +2,8 @@ action=$1 shift -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" enotesedit useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" enotesedit usage else "$TODO_FULL_SH" enotesedit "$@" fi diff --git a/actions/enotes/enotesarchive b/actions/enotes/enotesarchive index 54bd58e..b6e5f52 100755 --- a/actions/enotes/enotesarchive +++ b/actions/enotes/enotesarchive @@ -3,7 +3,7 @@ # License: GPL, http://www.gnu.org/copyleft/gpl.html case $1 in - "useage") + "usage") echo " $(basename $0)" echo " archive encrypted notes files nolonger in todo file." echo " If BASENAME is not given, defaults to 'todo'." diff --git a/actions/enotes/enotescat b/actions/enotes/enotescat index 916e7ca..17709f3 100755 --- a/actions/enotes/enotescat +++ b/actions/enotes/enotescat @@ -3,7 +3,7 @@ # License: GPL, http://www.gnu.org/copyleft/gpl.html case $1 in -"useage") +"usage") echo " $(basename $0) [NOTESFILE]" echo " Cat encyrpted notes file, use lsenotes to get list of notes" echo "" @@ -11,7 +11,7 @@ case $1 in *) if [ $# -lt 2 ]; then - $0 useage + $0 usage exit 1 fi NOTE_FILE=$(echo $2 | sed 's/^enote://g') diff --git a/actions/enotes/enotesedit b/actions/enotes/enotesedit index d4b3301..f9a7226 100755 --- a/actions/enotes/enotesedit +++ b/actions/enotes/enotesedit @@ -2,7 +2,7 @@ # 2011 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -useage () { +usage () { echo " $(basename $0) [NOTESFILE]" echo " Edit encrypted NOTESFILE in \$EDITOR." echo " Use listenotes to show all encrypted notesfiles." @@ -10,13 +10,13 @@ useage () { } case $1 in - "useage") - useage + "usage") + usage ;; *) if [ $# -lt 2 ]; then - $0 useage + $0 usage exit 1 fi cd $TODO_DIR diff --git a/actions/enotes/listenotes b/actions/enotes/listenotes index a2a8225..b5c3bb2 100755 --- a/actions/enotes/listenotes +++ b/actions/enotes/listenotes @@ -2,23 +2,23 @@ # 2009 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -if [ $1 != "useage" ]; then +if [ $1 != "usage" ]; then action=$1;shift fi set -x -useage() { +usage() { echo " $(basename $0)" echo " List notes" echo "" } case $1 in - "useage") - useage + "usage") + usage ;; "-h") - useage + usage ;; *) diff --git a/actions/enotes/lsen b/actions/enotes/lsen index 06b61cc..a3cbeb9 100755 --- a/actions/enotes/lsen +++ b/actions/enotes/lsen @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" listenotes useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" listenotes usage else "$TODO_FULL_SH" listenotes "$@" fi diff --git a/actions/lists/listactions b/actions/lists/listactions index 2160b20..5ad8fa2 100755 --- a/actions/lists/listactions +++ b/actions/lists/listactions @@ -1,24 +1,24 @@ #!/usr/bin/env bash # 2009 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -if [ $1 != "useage" ]; then +if [ $1 != "usage" ]; then action=$1;shift fi -useage (){ +usage (){ echo " $(basename $0)" echo " list all possible actions" echo "" } case $1 in -"useage") - useage +"usage") + usage exit 0 ;; "-h") - useage + usage ;; *) diff --git a/actions/lists/listcontexts b/actions/lists/listcontexts index b2dedeb..9128759 100755 --- a/actions/lists/listcontexts +++ b/actions/lists/listcontexts @@ -2,23 +2,23 @@ # 2011 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -if [ $1 != "useage" ]; then +if [ $1 != "usage" ]; then action=$1;shift fi -useage() { +usage() { echo " $(basename $0)" echo " List contexts" echo "" } case $1 in - "useage") - useage + "usage") + usage ;; "-h") - useage + usage ;; *) diff --git a/actions/lists/listprojects b/actions/lists/listprojects index 7abe9e7..00f9371 100755 --- a/actions/lists/listprojects +++ b/actions/lists/listprojects @@ -2,23 +2,23 @@ # 2009 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -if [ $1 != "useage" ]; then +if [ $1 != "usage" ]; then action=$1;shift fi -useage() { +usage() { echo " $(basename $0)" echo " List projects" echo "" } case $1 in - "useage") - useage + "usage") + usage ;; "-h") - useage + usage ;; *) diff --git a/actions/lists/lsac b/actions/lists/lsac index f19e992..8ec6156 100755 --- a/actions/lists/lsac +++ b/actions/lists/lsac @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" listactions useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" listactions usage else "$TODO_FULL_SH" listactions "$@" fi diff --git a/actions/lists/lsc b/actions/lists/lsc index d2060c2..beddc88 100755 --- a/actions/lists/lsc +++ b/actions/lists/lsc @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" listcontexts useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" listcontexts usage else "$TODO_FULL_SH" listcontexts "$@" fi diff --git a/actions/lists/lsp b/actions/lists/lsp index 89e2ab2..de47984 100755 --- a/actions/lists/lsp +++ b/actions/lists/lsp @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" listprojects useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" listprojects usage else "$TODO_FULL_SH" listprojects "$@" fi diff --git a/actions/lists/lsprjnopri b/actions/lists/lsprjnopri index ef4e0cf..8a073ed 100755 --- a/actions/lists/lsprjnopri +++ b/actions/lists/lsprjnopri @@ -2,11 +2,11 @@ # 2011 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -if [ $1 != "useage" ]; then +if [ $1 != "usage" ]; then action=$1;shift fi -useage() { +usage() { echo " $(basename $0)" echo " List projects with no priorities set" echo "" @@ -25,12 +25,12 @@ COLOR_DONE=$NONE TODOTXT_VERBOSE=0 case $1 in - "useage") - useage + "usage") + usage ;; "-h") - useage + usage ;; *) diff --git a/actions/lists/prels b/actions/lists/prels index 6bb9f1f..f07684a 100755 --- a/actions/lists/prels +++ b/actions/lists/prels @@ -2,25 +2,25 @@ # 2011 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -if [ $1 != "useage" ]; then +if [ $1 != "usage" ]; then action=$1;shift fi -useage() { +usage() { echo " $(basename $0)" echo " Prepend something to list command" - echo " useage:" + echo " usage:" echo " todo.sh prels prepend text" echo "" } case $1 in - "useage") - useage + "usage") + usage ;; "-h") - useage + usage ;; *) diff --git a/actions/notes/listnotes b/actions/notes/listnotes index 4152f3f..480d102 100755 --- a/actions/notes/listnotes +++ b/actions/notes/listnotes @@ -2,23 +2,23 @@ # 2009 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -if [ $1 != "useage" ]; then +if [ $1 != "usage" ]; then action=$1;shift fi -useage() { +usage() { echo " $(basename $0)" echo " List notes" echo "" } case $1 in - "useage") - useage + "usage") + usage ;; "-h") - useage + usage ;; *) diff --git a/actions/notes/lsn b/actions/notes/lsn index 88d46a1..b4e53e8 100755 --- a/actions/notes/lsn +++ b/actions/notes/lsn @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" listnotes useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" listnotes usage else "$TODO_FULL_SH" listnotes "$@" fi diff --git a/actions/notes/na b/actions/notes/na index 1ce4782..1a1d936 100755 --- a/actions/notes/na +++ b/actions/notes/na @@ -2,8 +2,8 @@ action=$1 shift -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" notesarchive useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" notesarchive usage else "$TODO_FULL_SH" notesarchive "$@" fi diff --git a/actions/notes/nc b/actions/notes/nc index 60a71de..c4d9693 100755 --- a/actions/notes/nc +++ b/actions/notes/nc @@ -2,8 +2,8 @@ action=$1 shift -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" notescat useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" notescat usage else "$TODO_FULL_SH" notescat "$@" fi diff --git a/actions/notes/ne b/actions/notes/ne index fc49f60..1f9452e 100755 --- a/actions/notes/ne +++ b/actions/notes/ne @@ -2,8 +2,8 @@ action=$1 shift -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" notesedit useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" notesedit usage else "$TODO_FULL_SH" notesedit "$@" fi diff --git a/actions/notes/notesarchive b/actions/notes/notesarchive index 00b9a9c..7178594 100755 --- a/actions/notes/notesarchive +++ b/actions/notes/notesarchive @@ -3,7 +3,7 @@ # License: GPL, http://www.gnu.org/copyleft/gpl.html case $1 in - "useage") + "usage") echo " $(basename $0)" echo " archive notes files nolonger in todo file." echo " If BASENAME is not given, defaults to 'todo'." diff --git a/actions/notes/notescat b/actions/notes/notescat index c371721..1ec323d 100755 --- a/actions/notes/notescat +++ b/actions/notes/notescat @@ -2,7 +2,7 @@ # 2009 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html case $1 in -"useage") +"usage") echo " $(basename $0) [NOTESFILE]" echo " Cat notes file, use lsnotes to get list of notes" echo "" @@ -10,7 +10,7 @@ case $1 in *) if [ $# -lt 2 ]; then - $0 useage + $0 usage exit 1 fi NOTE_FILE=$(echo $2 | sed 's/^note://g') diff --git a/actions/notes/notesedit b/actions/notes/notesedit index 51c7cf1..b0f9d8b 100755 --- a/actions/notes/notesedit +++ b/actions/notes/notesedit @@ -16,7 +16,7 @@ commit () { } case $1 in - "useage") + "usage") echo " $(basename $0) [NOTESFILE]" echo " Edit NOTESFILE in \$EDITOR." echo " Use listnotes to show all notesfiles." @@ -25,7 +25,7 @@ case $1 in *) if [ $# -lt 2 ]; then - $0 useage + $0 usage exit 1 fi cd $TODO_DIR diff --git a/actions/projectview/projectview b/actions/projectview/projectview index 42e14b9..408ede3 100755 --- a/actions/projectview/projectview +++ b/actions/projectview/projectview @@ -44,7 +44,7 @@ fi # Stop filter now and run in a controlled manner after the _list function is run TODOTXT_DISABLE_FILTER=1 -[ "$action" = "useage" ] && { +[ "$action" = "usage" ] && { echo " $(basename $0) [TERM...]" echo " Show todo items containing TERM, grouped by project, and displayed in" echo " priority order. If no TERM provided, displays entire todo.txt." diff --git a/actions/projectview/pv b/actions/projectview/pv index f455b34..5251e16 100755 --- a/actions/projectview/pv +++ b/actions/projectview/pv @@ -1,6 +1,6 @@ #!/usr/bin/env bash -[ "$1" = "useage" ] && exit 0 +[ "$1" = "usage" ] && exit 0 shift "$TODO_SH" projectview "$@" diff --git a/actions/rename/projectrename b/actions/rename/projectrename index 468cc59..614d153 100755 --- a/actions/rename/projectrename +++ b/actions/rename/projectrename @@ -2,11 +2,11 @@ # 2010 Paul Mansfield # License: GPL, http://www.gnu.org/copyleft/gpl.html -if [ $1 != "useage" ]; then +if [ $1 != "usage" ]; then action=$1;shift fi -useage() { +usage() { echo " $(basename $0) [old project] [new project] [ITEM#]" echo " Rename old project to new project in ITEM#" echo " If no ITEM# given the rename all instances of old project" @@ -19,7 +19,7 @@ tests () { # test number of options if [ $# -lt 2 ]; then echo " Not enough options" - useage + usage exit 1 fi @@ -28,14 +28,14 @@ tests () { echo "Cannot find project $1" echo "We have: `$TODO_FULL_SH lsprj | tr '\n' ' '`" echo "" - useage + usage exit 1 fi # is new project valid as a project? if [ $(echo $2 | grep -c '^+\w') -ne 1 ]; then echo "New project is not valid" - useage + usage exit 1 fi @@ -45,14 +45,14 @@ tests () { if [ ! -z $(echo "$*" | sed 's/ //g') ]; then if [ $(echo "$*" | sed 's/ //g' | grep -c "^[0-9]\{1,\}$") -ne 1 ]; then echo "ITEM# should be numeric only" - useage + usage exit 1 fi # Check oldproject is found in those ITEM# for item in $*; do if [ $(sed -n ${item}p $TODO_FILE | grep -c "$oldproject") -ne 1 ]; then echo " Cannot find project $oldproject in line number $item" - useage + usage exit 1 fi done @@ -60,12 +60,12 @@ tests () { } case $1 in -"useage") - useage +"usage") + usage ;; "-h") - useage + usage ;; *) diff --git a/actions/rename/prr b/actions/rename/prr index 71fed80..01c6225 100755 --- a/actions/rename/prr +++ b/actions/rename/prr @@ -3,8 +3,8 @@ # Remove short code shift -if [ "$1" = "useage" ]; then - "$TODO_FULL_SH" projectrename useage +if [ "$1" = "usage" ]; then + "$TODO_FULL_SH" projectrename usage else "$TODO_FULL_SH" projectrename "$@" fi diff --git a/actions/tickle/tickled b/actions/tickle/tickled index 812ebcc..f7b993b 100755 --- a/actions/tickle/tickled +++ b/actions/tickle/tickled @@ -6,7 +6,7 @@ # License: GPL, http://www.gnu.org/copyleft/gpl.html #============ And now for some functions ================= -useage() +usage() { sed -e 's/^ //' < # License: GPL, http://www.gnu.org/copyleft/gpl.html -useage() +usage() { sed -e 's/^ //' <