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

Can't set associations with duti #27

Closed yb66 closed 6 years ago

yb66 commented 6 years ago

Hi there,

I'm having trouble setting associations using duti.

$ duti -x rtf                              
Xcode.app
/Applications/Xcode.app
com.apple.dt.Xcode

$ duti -s com.apple.TextEdit .rtf all 
# I tried with sudo too, and the `echo` syntax, nada

$ duti -x rtf                             
Xcode.app
/Applications/Xcode.app
com.apple.dt.Xcode

If I use GetInfo to change the association then I get:

$ duti -x rtf                             
TextEdit.app
/Applications/TextEdit.app
com.apple.TextEdit

duti version is 1.5.4. I'll be running OS X 10.9.5 until Apple fixes the egregious bugs they introduced subsequently. Let me know if there's any more info I need to supply.

Regards, iain

nivekkagicom commented 6 years ago

FWIW I believe the set command should be: duti -s com.apple.TextEdit public.rtf all As the set command takes a UTI not an extension: usage: duti -s bundle_id uti role Hope the above is helpful.

yb66 commented 6 years ago

Ah, I see. Thanks very much @nivekkagicom.