You can normally use filename extensions (like. I have a launchd agent that runs duti ~/.duti automatically when ~/.duti is changed. public.unix-executable all # executable scripts text, plain text files without an extension I have saved a file like this (with about 100 lines) as ~/.duti: ain-text all #. This answer has been updated to include the new links. The project hasn't seen any major progress since 2012 aside from configuration updates. NOTE: duti is no longer in active development and has been labeled by its maintainers as 'unsupported'. You can use mdls to see the UTIs of file types and something like osascript -e 'id of app 'AppName'' to see the bundle identifiers of applications.
Then add entries like this to the LSHandlers array:
Plutil -convert xml1 ~/Library/Preferences//.plist -o output.xml You can edit ~/Library/Preferences/ ( ~/Library/Preferences//.plist on Catalina) in a text editor after converting it to XML: plutil -convert xml1 ~/Library/Preferences/