PATDIFF(1)

NAME
patdiff - find differences between two files

SYNOPSIS
patdiff [options] prev-file next-file

DESCRIPTION
Put simply, patdiff compares the contents of the two files prev-file and next-file. If desired, a configuration file defining how to format the output can be used. The comparison is done using the patience diff algorithm By default, compare two files and output the result of the comparison to the terminal, highlighting differences between the files on a word-by-word basis. All whitespace is considered equal and effectively ignored. The styling of the output is determined by the configuration file used. A configuration file is searched for at ~/.patdiff, and if none is found, default styling is applied. The exit code follows the diff standard, much like GNU diff. (0 = same, 1 = different, 2 = error)

  Options
Below is a summary of all of the options that patdiff accepts Options can be abbreviated to any unique prefix of their name. Multiple options cannot be combined into a single command line word; they must be separated by spaces. -file FILE Use FILE as configuration file (overrides ~/.patdiff) -default Use the default configuration file (overrides ~./patdiff) -context NUM Display NUM lines of unchanged context before and after changes -unrefined Don't highlight differences between words, only highlight differences between lines (improves performance) -keep-whitespace Consider whitespace when comparing files -latex Output in LaTeX format instead of ANSI terminal -dont_produce_unified_lines When refining and highlighting the differences between the words of the files, don't unify the word difference into a single unified line. -quiet Only report whether files differ, don't print the actual differences. -shallow When comparing directories, don't recurse into subdirectories. Simply compare the files and directories in the immediate directories. If two subdirectories have the same name but different contents, enabling this option will cause them to be reported as such but treated as the same. -double-check If files seem the same, double check with 'cmp'. If they are not actually identical, report so, but still exit 0. mask-uniques When comparing directories, don't diff unique files against /dev/null. This is useful if you know the contents of the unique files and don't need to see the contents of the entire file. -ext-cmp FILE
By default, this program uses OCaml's String.compare function to compare each line.  With this option, you can provide an external program that takes two anonymous strings as arguments and returns exit codes according the diff standard (0 = same, 1 = different, 2 = error). patdiff will then use the external program when comparing lines.  Using this option implies -unrefined, because the external calls are expensive and refinement basically loses its meaning with an arbitrary compare    function.
alt-old NAME In the header of the output, use NAME instead of the default old filename and time last modified. -alt-new NAME Same as -alt-old, but for the new filename. -make-config FILE Write the default configuration file to FILE. No other arguments (besides the configuration FILE) are required (or accepted) if this flag is used. -readme
        Output a man page. No other arguments are required or accepted help
        Output a brief summary of a subcommand, detailing its usage

CONFIGURATION
Formatting for the output of patdiff is specified in the configuration file. All fields are optional. The following fields are available: config_path Directs patdiff to load another configuration file instead of this one. All other options in this file will be ignored.
        (config_path "/home/username/.patdiff2")

  Command Line Arguments
All command line arguments can be passed through the configuration file. If an argument is specified in both the configuration file and the command line, the command line overrides the configuration file. (context 3) (unrefined true) (word_unify true) (keep_whitespace true) (quiet true) (shallow true) (double_check true) (mask_uniques true) (latex true) (alt_old "old") (alt_new "new") (ext_cmp "str_cmp.sh")

  Format and Styling
The following styles are available: Bold Underline Emph (Emph is Underline in ANSI, italics in LaTeX) Dim Blink Inverse Hide These options mean nothing in LaTeX, and some terminals don't support them well, if at all. (Fg color) (Foreground color) (Bg color) (Background color) Background colors mean nothing in LaTeX. The following colors are available for both LaTeX and ANSI outputs: Yellow Blue Black Red Green Magenta Cyan White Gray Default Bright_yellow Bright_blue Bright_black Bright_red Bright_magenta Bright_cyan Bright_white Bright_green The folowing colors have meaning for LaTeX only: CMYK (f,f,f,f) Each f is a number in the range [0-1.00], specifying the percentage of cyan, magenta, yellow, and black respectively in the color. Most formatting options consist of three fields: prefix, suffix, and style. The prefix and suffix fields have identical specifications:
  text
  The characters that will be printed when the prefix or suffix
  is used.
  style
  The styling applied to the prefix or suffix text. style The styling applied to the contents of the line. Line format options have one additional field: word_same word_same When refining this kind of line, the styling applied to words that are the same between the two lines. The following formatting options are available:
        line_same
        line_old
        line_new
        line_unified
        word_same_old
        word_same_new
        word_same_unified
        word_old
        word_new
        hunk
        header_old
        header_new See the default configuration file to for a sample configuration.