moretension / duti

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

Finder still shows old default #38

Open tekumara opened 4 years ago

tekumara commented 4 years ago

I've used duti to set the default to vscode for text files:

$ duti -s com.microsoft.VSCode    public.plain-text       editor

$ duti -d public.plain-text
com.microsoft.vscode

When I double click on the file in Finder, it opens with vscode.

However for a text file, Finder still:

  1. Shows the kind as TextEdit
  2. Open With shows TextEdit (default)
  3. Get Info shows Open with: TextEdit

How can I get Finder to show the new default (vscode) instead?

nburns commented 4 years ago

seems a bit harsh but does killall Finder work?

tekumara commented 4 years ago

Thanks @nburns that (mostly) works!

After running killall Finder, Finder:

But:

The problem also remains when I try duti -s com.microsoft.VSCode public.plain-text all && killall Finder

faelin commented 2 years ago

seems a bit harsh but does killall Finder work?

This is a standard method to reload the Finder, which is fine since the Finder has had a long history of not refreshing itself after making configuration changes (for example, changing the Dock settings via CLI).

faelin commented 2 years ago

@tekumara this is a very late response, but consider restarting your machine next time and see if that helps?