Automator Quick Action for KDiff3 in Finder
The need for quick action
kdiff31 is a diff & merge tool that compares multiple files/directories and shows the difference line by line and character by character as shown below.
In Windows, when we select multiple files/directories and right click on them, it will show the option to compare selected items with kdiff3.
However, in Macbook, it doesn't show this option. In this tutorial, let us see how we can create the same quick action in the right-click menu when we right-click on the files/directories.
Creating Quick Action
Let us open Automator2, create new file and select Quick Action.
On the left side select
Utilities and then select
Run Shell Script.
For Workflow receives current, select
files or folders and then select
Then select pass input
as agruments and in the script section let us add the following command.
/path/to/kdiff3 $1 $2
After adding the command, save this Quick Action.
Now if we relaunch Finder app and then select multiple directories, and right click we can see
Compare with KDiff3 in quick actions.
Even though we can use the command line to compare the files/directories, it is always good to have a quick action in the right-click menu.