Kaleidoscope Command Line Tool

The Kaleidoscope ksdiff command line tool serves two main purposes:

  1. It acts as the driving force behind many other integrations
  2. It can be used directly to compare and merge any number of files

Installation

To install or remove, follow these instructions:

!

Update Available

Install the latest version to ensure a properly working setup.

1
Install the ksdiff command line tool Update the ksdiff command line tool The ksdiff tool is installed via a link in /usr/local/bin

Usage Examples

Compare the text content two draft plain text documents with the final Word document:

ksdiff ~/Documents/Draft1.txt ~/Documents/Draft2.txt ~/Desktop/Final.doc

Merge conflicting changes between Draft1.txt and Draft2.txt into Merge.txt:

ksdiff --merge --output ~/Documents/Merge.txt ~/Documents/Draft1.txt ~/Documents/Draft2.txt

Pipe content into ksdiff using -. This command will compare an original LoremIpsum.txt file with one where all u characters have been replaced with v.

cat LoremIpsum.txt | sed "s/u/v/g" | ksdiff LoremIpsum.txt -

Process Substitution can help comparing the output of multiple other calls. The following sample will compare the output of sorting file1 with the output of sorting file2, without the need to store the sorted files somewhere.

ksdiff <(sort file1) <(sort file2)

Repeatedly send content into the same Kaleidoscope window using the -l option (and piping). The following command will show processes that consume at least 1% of CPU. Use multiple times to compare over time.

ps -crx -o%cpu,command | grep -e "^\s.[1-9]" | ksdiff -l "ps"