Say, you want spotlight to find MacVim. Doing
brew linkapps macvim
creates a symlink in /Applications
. But Spotlight seems to ignore it. Instead, remove the symlink
rm /Applications/MacVim.app
and do
osascript -e 'tell application "Finder" to make alias file to POSIX file "/usr/local/opt/macvim/MacVim.app" at POSIX file "/Applications"'
Nice!