Skip to main content

pdiff

Pretty side-by-side diff.

Inspired by ydiff and icdiff.

Example

pdiff.png

Installation

pip install pdiff

Or:

brew install nkouevda/nkouevda/pdiff

Usage

usage: pdiff [<options>] [--] <left file> <right file>

Pretty side-by-side diff

options:
  -h, --help            show this help message and exit
  -b, --background, --no-background
                        highlight background instead of foreground (default: True)
  -l, --line-numbers, --no-line-numbers
                        show line number columns (default: True)
  -t, --expand-tabs <n>
                        expand tabs to <n> spaces (default: 8)
  -s, --signs, --no-signs
                        show sign columns (default: True)
  -U, --unified <n>     show <n> lines of context (default: 3)
  -v, --version         show program's version number and exit
  -w, --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 --Raw-control-chars --quit-on-intr"

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

License

MIT License

Metadata

Release files for pdiff 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdiff 1.1.5
File Size Uploaded
pdiff-1.1.5.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdiff 1.1.5
File Interpreter ABI Platform
pdiff-1.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / pdiff-1.1.5.tar.gz

Download URL pdiff-1.1.5.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
65c3a1ab67060a337f03c0cacbbcd24bfbf1bf17961ca1b3875f47662745a7d5
BLAKE2b-256 checksum
How to use checksums
ea6d386386e23918a79f144c6c58c9d01fc89dec008bcc053def4e8fc98d1d98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.5

Release files / pdiff-1.1.5-py3-none-any.whl

Download URL pdiff-1.1.5-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dc2327b96548c6fefb94d5bc4e689eff5460f36debabb829bb8f68ead98bcf5
BLAKE2b-256 checksum
How to use checksums
6e71c44139446f1d58dab87c9d588229b6973e6abab987d85902ab8b5522c815
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.1.5 This release

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page