From 60eac0aa70673ff87e7cb6ef37b8b1dd6393701e Mon Sep 17 00:00:00 2001 From: Timothy Hallett Date: Thu, 29 Jan 2015 10:47:10 -0600 Subject: Fix for passing a filter as first arg, command as second arg --- task-git.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/task-git.sh b/task-git.sh index 31ddee3..0e51278 100755 --- a/task-git.sh +++ b/task-git.sh @@ -63,6 +63,24 @@ do esac done +# Check if we are passing a command for the second arg (filter for the first) +if [ $PUSH -eq 0 ] +then + for i in $2 + do + case $i in + add|append|completed|delete|done|due|duplicate|edit|end|modify|prepend|rm|start|stop) + PUSH=1 + echo "Push" + ;; + *) + ;; + esac + done +fi + + + pushd $DATA_DIR > $LOGFILE # Check if we have a place to push to GIT_REMOTE=$(git remote -v | grep push | grep origin | awk '{print $2}') -- cgit v1.2.1