Bash completion for Mac app aliases

This one is simple but nifty.

I have a slew of aliases that launch various apps. Quite a few of them launch apps that I generally only use with one type of file. Xcode and TaskPaper, for example. I wanted a completion system that would find just the applicable files in the directory. In most cases with these apps there’s only one file per project, so being able to type xc and hit tab to open the xcodeproj file for the current project is handy.


This is a companion discussion topic for the original entry at https://brettterpstra.com/2013/11/02/bash-completion-for-mac-app-aliases