Faster here document outputs. (Help/Usage messages)
This commit is contained in:
17
todo.sh
17
todo.sh
@@ -4,7 +4,8 @@
|
||||
# Place the .todo/config file in your home directory or use the -d option for a custom location.
|
||||
|
||||
[ -f VERSION-FILE ] && . VERSION-FILE || VERSION="@DEV_VERSION@"
|
||||
version() { sed -e 's/^ //' <<EndVersion
|
||||
version() {
|
||||
cat <<-EndVersion
|
||||
TODO.TXT Command Line Interface v$VERSION
|
||||
|
||||
First release: 5/11/2006
|
||||
@@ -13,7 +14,7 @@ version() { sed -e 's/^ //' <<EndVersion
|
||||
License: GPL, http://www.gnu.org/copyleft/gpl.html
|
||||
More information and mailing list at http://todotxt.com
|
||||
Code repository: http://github.com/ginatrapani/todo.txt-cli/tree/master
|
||||
EndVersion
|
||||
EndVersion
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -26,16 +27,16 @@ oneline_usage="$TODO_SH [-fhpantvV] [-d todo_config] action [task_number] [task_
|
||||
|
||||
usage()
|
||||
{
|
||||
sed -e 's/^ //' <<EndUsage
|
||||
cat <<-EndUsage
|
||||
Usage: $oneline_usage
|
||||
Try '$TODO_SH -h' for more information.
|
||||
EndUsage
|
||||
EndUsage
|
||||
exit 1
|
||||
}
|
||||
|
||||
shorthelp()
|
||||
{
|
||||
sed -e 's/^ //' <<EndHelp
|
||||
cat <<-EndHelp
|
||||
Usage: $oneline_usage
|
||||
|
||||
Actions:
|
||||
@@ -63,13 +64,13 @@ shorthelp()
|
||||
report
|
||||
|
||||
See "help" for more details.
|
||||
EndHelp
|
||||
EndHelp
|
||||
exit 0
|
||||
}
|
||||
|
||||
help()
|
||||
{
|
||||
sed -e 's/^ //' <<EndHelp
|
||||
cat <<-EndHelp
|
||||
Usage: $oneline_usage
|
||||
|
||||
Actions:
|
||||
@@ -221,7 +222,7 @@ help()
|
||||
TODOTXT_DEFAULT_ACTION="" run this when called with no arguments
|
||||
TODOTXT_SORT_COMMAND="sort ..." customize list output
|
||||
TODOTXT_FINAL_FILTER="sed ..." customize list after color, P@+ hiding
|
||||
EndHelp
|
||||
EndHelp
|
||||
|
||||
if [ -d "$TODO_ACTIONS_DIR" ]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user