Skip to content

Commit

Permalink
Integrate riff in git-log-fzf
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Nov 28, 2024
1 parent e4895af commit 23e191e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkgs/git-log-fzf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pkgs.writeShellApplication rec {
gh
colorized-logs
bat
riffdiff
(import ../git-log-simple { inherit pkgs; })
]
++ (lib.optionals stdenv.isLinux [
Expand Down
3 changes: 2 additions & 1 deletion pkgs/git-log-fzf/git-log-fzf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ git-log-simple | _fzf_git_fzf --ansi --nth 1,3.. --no-sort --query "$query" --bo
cut --delimiter " " --fields 2 --only-delimited | \
ansi2txt | \
xargs --no-run-if-empty --max-lines=1 git show --color=always | \
riff --color=on | \
bat --language=gitlog --color=always --style=plain --wrap=character' \
--header $'CTRL-O (Open in browser) / CTRL-R (Revert)\nEnter (Detail)\n\n' \
--bind 'ctrl-o:execute-silent(gh browse {2})' \
--bind 'ctrl-r:become(git revert {2})' \
--bind 'enter:become(git show --color=always {2} | bat --language=gitlog --color=always --style=plain --wrap=character)'
--bind 'enter:become(git show --color=always {2} | riff --color=on | bat --language=gitlog --color=always --style=plain --wrap=character)'

0 comments on commit 23e191e

Please sign in to comment.