Skip to content

add a task using bash script #19

Open
wants to merge 1 commit into from

3 participants

@ecarter
ecarter commented Feb 22, 2012

Very minor but I've found it useful while trying out Atea as a daily todo app.

Usage:

tasks.sh -a "[github] Contribute to Atea project - 5m"

I currently have tasks.sh in my PATH with task-add aliased to tasks.sh -a

Great project!

@ecarter ecarter add a task using bash script
Usage: tasks.sh -a "[github] Contribute to Atea project - 5m"
83d5db7
@pkamenarsky
Owner

That's a cool idea - but what happens if I do it this way:

tasks.sh -o -a "asdasd"

Nothing gets added! That's why I wanted to switch to getopts or whatever the bash parsing thing is called so that random-order arguments are possible: #5

Glad you like Atea! :)

@ecarter
ecarter commented Feb 22, 2012

Agreed, this is definitely not a fully implemented solution in the current pull request.

I'll take a look at updating this to support multiple flags. The functionality seems expected and shouldn't be much trouble.

There's a lot of potential in a robust Atea shell tool.

@pkamenarsky
Owner

Agreed, a good shell script would definitely aid a lot in automating things even further.

When / if Atea gets support for configurable todo file syntax,I guess it would also be possible to use the todo.txt cli shell script.

@databyte

I using zsh and have this:

export TODO=~/Dropbox/Documents/todo.txt
function todo() { if [ $# -eq 0 ]; then cat $TODO; else echo "$@" >> $TODO; fi }
function todone() { sed -i -e "/$*/d" $TODO; }

I'm sure it could be fancier but this works for me.

todo          # lists all current tasks
todo testing  # adds testing
todone test   # marks anything starting with test as done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.