TUI for navigating file blames similar to GitHub's web UI
MIT License
A TUI for navigating file blames similar to GitHub's web UI experience.
This is a toy project to help me learn Rust while building something I find useful.
git clone https://github.com/izuzak/blame
cd blame
cargo build --release
# the target/release directory contains the "blame" binary now
# you can move it to a directory in your PATH or run it directly
# file - path to a file
# ref - a commit hash, branch, or tag
blame <some/git/repo/filepath> <ref>
# Example: blame the src/main.rs file in the Git repository for the project
blame src/main.rs HEAD
Keyboard navigation:
up
- move selection to line above.down
- move selection to line below.}
- move selection to first line of block above.{
- move selection to first line of block below.left
- travel backwards in time: show the blame for the file at the parent of the commit which changed the current line.right
- travel forwards in time: show the blame for the file and the commit from which we arrived at the current commit.q
- exit the program.clap
- Command line argument parsing.crossterm
and ratatui
- Terminal user interface.regex
- Git blame output parsing.syntect
and ansi-to-tui
- Syntax highlighting.?
.