Open tcurdt opened 4 years ago
I don't think there's a way to see which applications can handle which files; for that you might need to look to launchservices.
According to the readme, though, you can at least get the default application for a file extension with duti -x .jpg
for example.
EDIT: there's a downstream fork that appears to have added a good chunk of additional reporting info: https://github.com/nivekkagicom/duti/commit/589ce890e1bc97f1667ada9b0842f7521ce7675d
didn't try it yet - but it looks like I wish that would make it upstream
What about files without any extension like? Dockerfile
, Containerfile
? MacOS seems to make very unfortunate decisions about whom should open them, like picking either TextEdit, Notes or Xcode.
I am also curious how to list all handlers registered by specific app I want to avoid opening by mistake... like xcode.
I think these all fall under the public.source-code type. Check out my dotfiles for some example associations with duti: https://github.com/iloveitaly/dotfiles/blob/ea2e0bf0231f69f9a1bcb0b10087e46c422b18d9/duti#L15
Message ID: @.***>
dutis is a wrapper of duti, providing a interactive way to set default applications from command line
@tsonglew cool! Want to submit a PR to link to that tool on the readme?
@tsonglew cool! Want to submit a PR to link to that tool on the readme?
Sure, I'm glad to. I created a PR here #54
There are UTIs, there are protocols and there are extensions. And I understand I can set the defaults with
dtui
.But is there a way to list all the applications for a given extension and protocol - and which one is the default?