db6676717079be729233724bbdb70b6e069585fb
And replace tabs by spaces.
To illustrate the interest of this new variable, here is an action
to replace the original add to allow a priority to be set when adding.
The action itself relies on the original add, therefore the need for
this new envvar.
action=$1
shift
[ "$action" = "usage" ] && {
echo " add pri PRIORITY \"THING I NEED TO DO +project @context\""
echo " add an item and prioritize it in one step"
echo ""
exit
}
. $TODOTXT_CFG_FILE
TODOTXT_UNDEF_CUSTOM_ACTIONS=1
PRIORITY=false
if [ x"$1" = x"pri" -o x"$1" = x"p" ] && [[ x"$2" =~ x[a-zA-Z] ]]; then
PRIORITY=$2
shift
shift
fi
if $TODO_SH add "$@" && [ $PRIORITY != false ]; then
# figure out the line of what we just added, and "do" it
line=`wc -l "$TODO_FILE" | cut -d' ' -f1`
$TODO_SH pri "$line" $PRIORITY
fi
TODO.TXT Manager
Version 2.1
Author: Gina Trapani (ginatrapani@gmail.com)
Last updated: 2/23/2009
Release date: 5/11/2006
License: GPL, http://www.gnu.org/copyleft/gpl.html
More information and mailing list at http://todotxt.com
Gina's deploy branch is here: http://github.com/ginatrapani/todo.txt-cli/tree/master If possible fork from there for most convenient integration.
Description
☑ A simple and extensible shell script for managing your todo.txt file.
http://todotxt.org
Languages
Shell
98.7%
Makefile
1.3%