开发者

Autocompletion based on filenames in a directory

I want to have a function in my zsh for faster accessing my todo-files. It s开发者_高级运维hould 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


This would seem to do the trick:

compdef '_files -W "$HOME/tasks"' task
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜