LoginSignup
13
10

More than 5 years have passed since last update.

brew linkapps したアプリが Spotlight でヒットしないとお嘆きのあなたに

Last updated at Posted at 2016-07-24

小ネタ。

$ brew install macvim
$ brew linkapps macvim
$ ll /Applications/MacVim.app
lrwxr-xr-x 1 delphinus admin 45  7 24 21:50 /Applications/MacVim.app -> /usr/local/Cellar/macvim/7.4-104_1/MacVim.app

brew linkapps コマンドを使うと /Applications フォルダにシンボリックリンクを作ってくれるので Finder からダブルクリックして簡単に起動できるようになります。

でもこれ、Spotlight で検索できないんですよね。

そんなときの Tips。

シンボリックリンクじゃなくてエイリアスを使う

  1. Finder で ⌘G して /usr/local/Cellar/macvim/7.4-104_1(バージョンによって違う)に移動。
  2. 右クリックしてエイリアスを作成
  3. MacVim のエイリアスというファイルができるので ⌘C でコピー。
  4. ⌘G/Applications に移動。
  5. ⌥⌘V で貼り付けて移動。

これで OK! Spotlight でもヒットするはずです。

右クリックとかかったるい! CLI 最高!

な人向け。

osascript -e 'tell application "Finder" to make alias file to POSIX file "/usr/local/Cellar/macvim/7.4-104-1/MacVim.app" at POSIX file "/Applications"'

早い!

参考

13
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
10