views:

30

answers:

1

Hi there,

I want to have a function in my zsh for faster accessing my todo-files. It should look inside the folder ~/tasks where i put my todo-lists and stuff. Now i want to type task p and when I hit tab, it should use the files in that directory for autocompletition. Can anyone point me some direction? Or share some snippet to work with?

Thanks

+2  A: 

This would seem to do the trick:

compdef '_files -W "$HOME/tasks"' task
Dennis Williamson