Macos – Homebrew “linkapps” command not found. What can replace it so I can use MacVim as default editor for some file types

homebrewmacosmacvim

My Homebrew version is:

Homebrew 1.7.1-114-g545eb91
Homebrew/homebrew-core (git revision 279277; last commit 2018-08-04)

When I run:

brew linkapps

The response I get is:

Error: Unknown command: linkapps`

And it's also not listed in brew commands. Is the command removed? Is there any replacement?

In my case I’m trying to use MacVim as default editor for some file types opened in Finder and sometimes MacVim isn’t listed in the open with menu in finder. So I am hoping to have a symlink in the /Applications/ folder which always points to the newest version of MacVim installed.

Best Answer

It seems like brew linkapps has been depreciated since around January 2017 according to this pull request’s comment thread. And the version of Homebrew you are using is up to date as off August 2018. So that explains that!

As for why it’s depreciated, as explained in that commit’s comment thread:

Unfortunately brew linkapps cannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" .app bundles that can be relocated. Instead, please consider using brew cask and migrate formulae using .apps to casks.

I am unsure if there is a generic solution in place to replace linkapps functionality—which basically created symlinks between the Homebrew “Cellar” and the /Applications/ directory—but this is most likely now handled on an app by app and case by case basis.

If you can provide more detail as to why you are looking to use brew linkapps—like what apps you are trying to use that might need it—then perhaps someone here can provide you with some more assistance.