Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 2.09 KB

File metadata and controls

49 lines (33 loc) · 2.09 KB
permalink layout mainAnchor title subtitle
unixshell.html
default
unixShell
Unix Shell Scripting Support
Launching the UI from the Unix command line

The /Applications/VisualDiffer.app/Contents/Helpers folder contains the executable file visdiff that integrates with VisualDiffer.app.
You can launch visdiff to visually show a comparison of files or folders using the following syntax:

visdiff <left file or folder> <right file or folder>

Note: On versions older than 1.8.0 visdiff is located at /Applications/VisualDiffer.app/Contents/Resources/visdiff

If you need to wait until the user closes the diff document window (not necessarily quitting the application) associated with the visdiff command, you can pass the switch --wait.

For example

{% highlight bash %} $ visdiff ~/original.txt ~/modified.txt --wait {% endhighlight %}

VisualDiffer.app doesn't install the terminal application, but you can manually create the link to the shell command.
It requires root access; from a terminal prompt type the command shown below.

{% highlight bash %} $ sudo ln -s /Applications/VisualDiffer.app/Contents/Helpers/visdiff /usr/bin/visdiff {% endhighlight %}

Note: VisualDiffer can't install the command line tool from its User Interface to comply with Apple's submission guidelines

VisualDiffer was sandboxed starting from version 1.4.2 and many users found using it very annoying because any comparison prompts to pick folders/files.
This problem was fixed in version 1.4.3 by introducing the so-called "Trusted Paths"; please refer to Trusted Paths for further details.