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.6.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdiff-1.0.6.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for pdiff-1.0.6.tar.gz
Algorithm Hash digest
SHA256 6a9150cf54fe787ea4e010c828c3afb76575f459996e94032126d2d2953f0095
MD5 e8f9fc48d8124373bc0a1ec77783f969
BLAKE2b-256 bb9fabd7feb2b61b090fc1907518b6233444ff1c3278eb62ceac9abf1ac3e43e

See more details on using hashes here.

Provenance

File details

Details for the file pdiff-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: pdiff-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for pdiff-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 dfc4f8efc88444f227097fc3dcbae33298de484a2892839a5ca667f26ed4fb1d
MD5 813f5406ef34259fc7500fa4200f99b1
BLAKE2b-256 da46a5e59ef70735d5684c46fdd20f05d2703df19ef4c10ff7c2f334061f619f

See more details on using hashes here.

Provenance

Supported by

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