moretension / duti

A command-line tool to select default applications for document types and URL schemes on Mac OS X
Other
1.46k stars 66 forks source link

Add extension to UTI? #9

Open balthisar opened 9 years ago

balthisar commented 9 years ago

*duti is probably working as designed; I was hoping it would allow me to assign an extension to an existing UTI.

For example currently I have a lot of source files -- say, .haml -- that have a dynamic UTI (mdls reports kMDItemContentType = "dyn.ah62d4rv4ge80u2prru"). The ContentTypeTree, naturally, doesn't contain an appropriate content type, and Mac OS X (Yosemite, but same problem existed on earlier systems) doesn't even recognize that .haml is an extension.

All I want to do is tell Mac OS X that .haml (and other extensions) is, in fact, an extension, and that the extension refers to public.plain-text (or whatever else I want to point it to).

I'm fairly certain I could make a dummy Mac OS app in Xcode with CFBundleTypeExtensions to make all of these associations, but these seems stupid if LaunchServices is simply going to copy them from the plist anyway.

tl;dr: Is this some type of functionality that would be possible to add to duti? E.g., extension .xxx means UTI com.something.whatever.

Thanks.