moretension / duti

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

list the default applications #42

Open tcurdt opened 4 years ago

tcurdt commented 4 years ago

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?

ideologysec commented 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

tcurdt commented 4 years ago

didn't try it yet - but it looks like I wish that would make it upstream

ssbarnea commented 1 year ago

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.

iloveitaly commented 1 year ago

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: @.***>

tsonglew commented 1 year ago

dutis is a wrapper of duti, providing a interactive way to set default applications from command line

https://github.com/tsonglew/dutis

iloveitaly commented 1 year ago

@tsonglew cool! Want to submit a PR to link to that tool on the readme?

tsonglew commented 1 year ago

@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