29

I see FileMerge in the Xcode app bundle:

/Applications/Xcode.app/Contents/Applications/FileMerge.app

I know I can open it on the command line using:

open /Applications/Xcode.app/Contents/Applications/FileMerge.app

But there seems like there should be an easier way. How can I tell Spotlight about FileMerge so I can open it with the keyboard? Is there another way to launch it without having to use the command-line?

Chris Williams
  • 11,647
  • 15
  • 60
  • 97

5 Answers5

16

Symbolic links also work.

% cd /Applications

% ln -s Xcode.app/Contents/Applications/FileMerge.app/ .

muchavie
  • 326
  • 2
  • 8
  • 1
    FWIW this does work for letting me go to /Applications/ and click on it, but doesn't make it show up in Spotlight (at lest not so far, maybe it will change, but usually Spotlight picks up changes to Applications immediately) – jerclarke May 18 '20 at 18:32
  • This also happened to me, but then when I tried creating an alias, as another another answer suggests, it started showing the alias and the symbolic link, so later I removed the alias. – Constantino Cronemberger Nov 13 '20 at 07:38
11

The easiest way I found was open -a FileMerge

8

Put an alias into the Applications folder. Spotlight and Launchpad will find it.

JW.
  • 50,691
  • 36
  • 115
  • 143
  • 4
    Hold command and option while dragging FileMerge.app to /Applications to create an alias without macOS wanting permissions to create the alias in the Xcode app's directory. – Well Actually Jul 11 '18 at 11:05
7

On MacOS Catalina, you just need to open spotlight (cmd+space) and type "FileMerge".

Rodrigo
  • 520
  • 5
  • 8
  • Are you sure? I have a fresh copy of Catalina from a laptop bought Jan 2020 and Xcode is installed, but Spotlight doesn't find FileMerge. – jerclarke May 18 '20 at 18:30
  • @jerclarke it finds FileMerge on Mojave too. No need to do anything. Retry after ticking all boxes in spotlight preferences. –  Jul 17 '20 at 14:44
  • 5
    yeah, it is not showing up anymore on spotlight, MacOS 10.15.6 – Rodrigo Jul 18 '20 at 15:39
  • @Rodrigo Right-click on Xcode and select `Show Package Contents`. You should be able to locate FileMerge this way on macOS Ventura 13.2 at `/Applications/Xcode.app/Contents/Applications` – user110857 Feb 16 '23 at 21:35
6

I had to do xcode-select -s /Applications/Xcode.app/Contents/Developer in order to have opendiff be accessible (required for SourceTree).

Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
  • 1
    I came here looking for a way to launch FileMerge from the command line while passing the left and right file paths to it programmatically. It looks like that is apparently exactly what `opendiff` is (`opendiff `). I wonder why they went with that name instead of `filemerge` for the command line version? – Taylor D. Edmiston Jan 19 '22 at 02:54
  • Works for me, see also here: https://gist.github.com/kristofferh/2895878 – algorhythm Feb 01 '22 at 09:25
  • Alternatively, you can open Xcode, then select "Settings" -> "Locations" and select the command line tools in the "Command Line Tools" selector. – Markus Mar 03 '23 at 07:51