Only Reset Action When Necessary plus Comments
This commit is contained in:
4
todo.sh
4
todo.sh
@@ -348,7 +348,10 @@ action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' )
|
|||||||
## or fallback to using a builtin
|
## or fallback to using a builtin
|
||||||
if [ "$action" == command ]
|
if [ "$action" == command ]
|
||||||
then
|
then
|
||||||
|
## Get rid of "command" from arguments list
|
||||||
shift
|
shift
|
||||||
|
## Reset action to new first argument
|
||||||
|
action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' )
|
||||||
elif [ -d "$HOME/.todo.actions.d" -a -x "$HOME/.todo.actions.d/$action" ]
|
elif [ -d "$HOME/.todo.actions.d" -a -x "$HOME/.todo.actions.d/$action" ]
|
||||||
then
|
then
|
||||||
"$HOME/.todo.actions.d/$action" "$@"
|
"$HOME/.todo.actions.d/$action" "$@"
|
||||||
@@ -356,7 +359,6 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## Only run if $action isn't found in .todo.actions.d
|
## Only run if $action isn't found in .todo.actions.d
|
||||||
action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' )
|
|
||||||
case $action in
|
case $action in
|
||||||
"add" | "a")
|
"add" | "a")
|
||||||
if [[ -z "$2" && $TODOTXT_FORCE = 0 ]]; then
|
if [[ -z "$2" && $TODOTXT_FORCE = 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user