1

Background

I've replaced Finder as the default folder-opening app by editing ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist:

<snip>
{
    LSHandlerContentType = "public.folder";
    LSHandlerPreferredVersions = {
        LSHandlerRoleAll = "-";
    };
    LSHandlerRoleAll = "org.yanex.marta";
},
<snip>

So now when I type open . or similar in the terminal, it opens the directory in Marta instead. That's good, I want that.

Issue

There's only one exception where I want to use Finder, and that's when opening the /Applications folder, since Marta is unable to delete stuff from /Applications.

I know this can be done with applescript, but applescripts have a few seconds' delay before they run, which I'm hoping to eliminate by using bash instead.

The purpose of all this is to have a script which can be called from raycast.

So far I've tried:

/System/Library/CoreServices/Finder.app /Applications # requires sudo

open /System/Library/CoreServices/Finder.app --args /Applications # just opens Finder but doesn't open the folder

1 Answer 1

1

Testing in both macOS Catalina and macOS Big Sur, the following command in Terminal opens a Finder window to /Applications:

open -a Finder /Applications
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .