GitHunt
DU

duganchen/git-commit-browser-for-kitty

Git commit browser for Kitty

Git commit browser for Kitty

demo

This is a system for using kitty to browse
git commits, gitk style.

sPut git_show_diff in your PATH.

Put the following in kitty.conf:

map ctrl+shift+p>h kitten hints --program @ --type regex --regex "\b([0-9a-f]{6}|[0-9a-f]{7}|[0-9a-f]{8}|[0-9a-f]{40})\b"
map ctrl+shift+p>g kitten hints --program "launch --cwd=current git_show_diff" --type regex --regex "\b([0-9a-f]{6}|[0-9a-f]{7}|[0-9a-f]{8}|[0-9a-f]{40})\b"

Display the git log in the terminal:

log

Press Ctrl+Shift+b and then g. You'll see a number next to each commit on the screen:

hints

Enter one of the numbers to see that commit:

hints

Press "q" to close the preview window.

Or press Ctrl+Shift+b and then h. Choose a hash, and it will be copied to the clipboard.

As of now, it's at the "works on my computer" (OS X, with Delta as the git pager) stage.

Languages

Shell100.0%

Contributors

MIT License
Created November 19, 2022
Updated December 15, 2022
duganchen/git-commit-browser-for-kitty | GitHunt