fzf: use delta to highlight git log preview

This commit is contained in:
Charles Gould 2022-11-20 01:57:39 -05:00
parent 886470354f
commit 6abc34b9f7

View File

@ -39,11 +39,11 @@ function __fzf_git_log
echo '__fzf_search_git_log: Not in a git repository!' >&2 echo '__fzf_search_git_log: Not in a git repository!' >&2
else else
set -l output ( set -l output (
command git logsearch | git logsearch |
fzf \ fzf \
--ansi \ --ansi \
--tiebreak=index \ --tiebreak=index \
--preview='git show --color {2}' \ --preview='git show {2} | delta' \
--preview-window='right,70%,wrap,hidden,<200(bottom,50%)' \ --preview-window='right,70%,wrap,hidden,<200(bottom,50%)' \
--bind='?:toggle-preview' \ --bind='?:toggle-preview' \
--header='? to preview' --header='? to preview'