In reference to Homebrew/brew/pull/1808
brew linkapps has been deprecated.
I compile MacVim using Homebrew and use linkapps all the time. Works somewhat fine.
Though since it'll eventually be removed I can't imagine myself having to manually link the .app bundle into /Applications/ every single time I upgrade.
The suggestion is to move .app type formula to brew cask
I'm not sure how that'll help the situation though.
Thoughts?
🤷♂️
ln -Fs `find /usr/local -name "MacVim.app"` /Applications/MacVim.app
Homebrew already links as @splhack suggested, yet it doesn't overcome the issues with spotlight. I've only been able to open macvim from terminal with mvim <filename>, or from opening within finder/Applications
I typically open MacVim via double clicking a file from the Finder.
Right now brew linkapps for the most part still works as intended, however it has been marked as deprecated.
The reason I made this issue was because of homebrew suggesting .app style formulae to migrate to brew casks and also to kind of brainstorm about the possible loss of brew linkapps
I'm curious why brew linkapps just can't copy the .app to /Applications instead of a symlink. That should solve any Spotlight issues.
sometimes is necessary to have access to the app in the cellar directory. I just installed a package in R and it didn't work properly because I moved the QGIS.app from the cellar to /applications.
I really think that the best solution would be move the app instead of link/symboic-linking it, and then create a symbolic-link in its place. I did that with this case and I fixed the problem while I had only one copy of the bundle app and I can call the app from spotlight (like any other mac app)
Another option hard links (instead of symbolic ones) or Aliases like this:
find /Applications -type l -depth 1 | while read f; do osascript -e "tell app \"Finder\" to make new alias file at POSIX file \"/Applications\" to POSIX file \"$(stat -f%Y "$f")\""; rm "$f"; done
For anyone who ends up here via Google, the preferred method to install via Homebrew seems to be the cask:
brew cask install macvim
will install MacVim into /Applications and also set up /usr/local/bin/vim & friends for you:
==> Installing Cask macvim
==> Moving App 'MacVim.app' to '/Applications/MacVim.app'.
==> Linking Binary 'mvim' to '/usr/local/bin/gview'.
==> Linking Binary 'mvim' to '/usr/local/bin/gvim'.
==> Linking Binary 'mvim' to '/usr/local/bin/gvimdiff'.
==> Linking Binary 'mvim' to '/usr/local/bin/mview'.
==> Linking Binary 'mvim' to '/usr/local/bin/mvimdiff'.
==> Linking Binary 'mvim' to '/usr/local/bin/view'.
==> Linking Binary 'mvim' to '/usr/local/bin/vim'.
==> Linking Binary 'mvim' to '/usr/local/bin/vimdiff'.
==> Linking Binary 'mvim' to '/usr/local/bin/mvim'.
🍺 macvim was successfully installed!
They do behave somewhat differently, as Homebrew directly checks out the repository and builds the code locally, which is a somewhat more involved step and allows you to check out later changes than casks, which only distribute binaries built by us when I do a release.
Most helpful comment