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