diff options
author | Timothy Hallett <thallett@gmail.com> | 2015-01-29 10:47:10 -0600 |
---|---|---|
committer | Timothy Hallett <thallett@gmail.com> | 2015-01-29 10:47:10 -0600 |
commit | 60eac0aa70673ff87e7cb6ef37b8b1dd6393701e (patch) | |
tree | e38d7292740d97a2c284da6fdc9e6fb5333541e1 | |
parent | d3b11a5656db5571da2404c5fc2dcb1a6afafb1d (diff) | |
download | task-git-60eac0aa70673ff87e7cb6ef37b8b1dd6393701e.tar.xz task-git-60eac0aa70673ff87e7cb6ef37b8b1dd6393701e.zip |
Fix for passing a filter as first arg, command as second arg
Diffstat (limited to '')
-rwxr-xr-x | task-git.sh | 18 |
1 files changed, 18 insertions, 0 deletions
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}') |