diffnav

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 11 Imported by: 0

README

diffnav

A git diff pager based on delta but with a file tree, à la GitHub.

[!CAUTION] This is early in development, bugs are to be expected.

Feel free to open issues.

Demo

Installation

Homebrew:

brew install dlvhdr/formulae/diffnav

Go:

go install github.com/dlvhdr/diffnav@latest

[!NOTE] To get the icons to render properly you should download and install a Nerd font from https://www.nerdfonts.com/. Then, select that font as your font for the terminal.

You can install these with brew as well: brew install --cask font-<FONT NAME>-nerd-font

Usage

Pipe into diffnav
  • git diff | diffnav
  • gh pr diff https://github.com/dlvhdr/gh-dash/pull/447 | diffnav
Set up as global git diff pager
git config --global pager.diff diffnav

Configuration

Keys

Key Description
j Next file
k Previous file
Ctrl-d Scroll the diff down
Ctrl-u Scroll the diff up
e Toggle the file tree
t Search/go-to file
y Copy file path
q Quit

Under the hood

diffnav uses:

Screenshots use:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL