Project

di

0.01
No release in over 3 years
Low commit activity in last 3 years
The di(1) command wraps around GNU diff(1) to provide reasonable default settings and some original features.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.2.2
 Project Readme

di¶ ↑

DESCRIPTION:¶ ↑

di - a wrapper around GNU diff(1)

FEATURES:¶ ↑

The di(1) command wraps around GNU diff(1) to provide reasonable default settings and some original features:

- Useful options turned on by default: -U3 -N -p -d.

- Diff output is colorized, and paginated by user's favorite pager.

- Non-significant files are ignored by default, such as backup
  files, object files, VCS administration files, etc. a la
  rsync(1)'s --cvs-ignore option.

- Ignore difference of lines containing RCS tags.

- Perform recursive comparison.

- Support combinations of command line options that GNU diff(1) is
  expected to but does not support.

- Default set of options are configurable via environment variable.

- Any option can be negated from a command line. (Specify -N- to
  negate the default -N, etc.)

SYNOPSIS:¶ ↑

Run di –help for help.

USAGE:¶ ↑

Just use di(1) for diff(1) as a wrapper.

There are a few occations you shouldn’t simply substitute di(1) for diff(1). For example, svn calls the external diff for each changed file, so the pagination enabled by default would be annoying.

In such a case, you can have a non-paginating version of di as below:

# Give it another name
ln di ndi

# Set default options for the new command; put these lines in your
# shell's startup file
NDI_OPTIONS=--no-pager
export NDI_OPTIONS

Then set diff-cmd to the new command in ~/.subversion/config.

[helpers]
diff-cmd = ndi

REQUIREMENTS:¶ ↑

  • Ruby 1.8.7 or later

  • GNU diff(1)

INSTALL:¶ ↑

gem install di

Or just install lib/di.rb as “di” to a directory in your PATH.

Copyright © 2008, 2009, 2010, 2011, 2012, 2013 Akinori MUSHA

See LICENSE for license terms.