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

Or:

brew install nkouevda/nkouevda/pdiff

Usage

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

Pretty side-by-side diff

optional arguments:
  -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 <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 --Raw-control-chars"

[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.1.4.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

pdiff-1.1.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdiff-1.1.4.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pdiff-1.1.4.tar.gz
Algorithm Hash digest
SHA256 9d8f6f8e7ed2ee61aa2f2526106c0047a2bd80eab7d1237f7086139a6e921c45
MD5 2da0d12ec9b1c2f0506c327bffd210a6
BLAKE2b-256 0ab437c13ba28107998673bee37ab4efa075e7f3059f68539c193ad14ca3128f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdiff-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pdiff-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ff50f19caffb7415c4244363233e019669b35b5ec43bd5f0f84f6837ab1068a4
MD5 c5b97086f6e3ae0aff1a78dc0b4d11df
BLAKE2b-256 f35274ae783736e30a36db773372a97a9c2c93144c4a83bc43eef5df93572aee

See more details on using hashes here.

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