Skip to content

Instantly share code, notes, and snippets.

@PeterNerlich
Created January 14, 2018 15:59
Show Gist options
  • Save PeterNerlich/8a69bd3201d109b522eb64b4475bc8e9 to your computer and use it in GitHub Desktop.
Save PeterNerlich/8a69bd3201d109b522eb64b4475bc8e9 to your computer and use it in GitHub Desktop.
Todo — A simple wrapper script for task
#!/bin/bash
help() {
echo "todo is a simple wrapper script for task."
echo "Just running 'todo' is the equivalent of 'task +todo'."
echo "Running 'todo -' will display all tasks not on the todo list: 'task -todo'"
echo ""
echo "todo = task +todo"
echo "todo add 2 = task 2 modify +todo"
echo "todo done 2 = task 2 modify -todo; task 2 done"
echo "todo drop 2 = task 2 modify -todo"
echo "todo - = task -todo"
echo ""
echo "Have fun and stay productive!"
}
if [ -f $(which task) ]; then
case "$1" in
add)
shift
task "$@" modify +todo
;;
done)
shift
task "$@" modify -todo
task "$@" done
;;
drop)
shift
task "$@" modify -todo
;;
help)
help()
;;
-)
task -todo
;;
*)
task +todo
;;
esac
else
echo "\tWARNING\t task: command not found"
help()
task
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment