Skip to main content

Pretty side-by-side diff

Project description

pdiff

Pretty side-by-side diff.

Inspired by ydiff and icdiff.

Example

pdiff.png

Installation

pip install pdiff

Usage

usage: pdiff [<options>] [--] <old file> <new file>

Pretty side-by-side diff

optional arguments:
  -h, --help            show this help message and exit
  -L, --line-numbers, --no-line-numbers
                        show line number columns; default: False
  -t <n>, --expand-tabs <n>
                        expand tabs to <n> spaces; default: 8
  -S, --signs, --no-signs
                        show sign columns; default: True
  -U <n>, --unified <n>
                        show <n> lines of context; default: 3
  -v, --version         show program's version number and exit
  -W <n>, --width <n>   fit output to <n> columns; default: autodetect

Git

Configure a pdiff difftool, and add some aliases to your liking, e.g.:

[difftool.pdiff]
	cmd = "pdiff -- \"$LOCAL\" \"$REMOTE\" | less -R"

[alias]
	dfp = difftool --tool=pdiff
	dfpc = difftool --tool=pdiff --cached

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdiff-1.0.5.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

pdiff-1.0.5-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pdiff-1.0.5.tar.gz.

File metadata

  • Download URL: pdiff-1.0.5.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.5

File hashes

Hashes for pdiff-1.0.5.tar.gz
Algorithm Hash digest
SHA256 ec59b579be3d3796aa2766382a9200be6f863dae74af27b4b5795a24b2f1d2d4
MD5 1427144c370fbf40ce82ca7b55c19840
BLAKE2b-256 d0383bc56a9d96ec64a84ad44f0e609647e357d0ede2e68abf76fe79794d2633

See more details on using hashes here.

File details

Details for the file pdiff-1.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: pdiff-1.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.5

File hashes

Hashes for pdiff-1.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a8ef3a8fa54e7a830c839bd1b98d965f901575a133f845234b2d515a13cefce8
MD5 900218dc237d0c8d404d696a0807699a
BLAKE2b-256 fd20c7f6a32e097824d2320add601d38146b61ac2605e13042390798a04ae85d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page