Skip to content

Instantly share code, notes, and snippets.

@timpulver
Last active November 15, 2015 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timpulver/f961ca9f2ae1c08a0f3a to your computer and use it in GitHub Desktop.
Save timpulver/f961ca9f2ae1c08a0f3a to your computer and use it in GitHub Desktop.

bash_autocomplete for projects in todo.txt

open ~/.bash_profile and add:

alias t='/usr/local/bin/todo.sh'
TODO_TXT_FILE="/path/to/todo-txt/todo.txt"
complete -W  "$(cat $TODO_TXT_FILE | grep -ow '\+\w*' | uniq | xargs)" t
```

Then writing `t +myp[TAB]` will result in `t +myproject`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment