diff --git a/home/dot_config/fish/functions/chai.fish.tmpl b/home/dot_config/fish/functions/chai.fish.tmpl index 49d2ee5..8af47ce 100644 --- a/home/dot_config/fish/functions/chai.fish.tmpl +++ b/home/dot_config/fish/functions/chai.fish.tmpl @@ -23,7 +23,7 @@ function chai --description "Interactive chezmoi apply with fzf diff preview" --with-nth=4 \ --nth=1 \ --prompt='Apply Changes > ' \ - --preview='chezmoi diff {1} 2>/dev/null | head -100' \ + --preview='chezmoi diff {1} 2>/dev/null | bat -pp --color=always --language=diff' \ --preview-window=right:60%:wrap \ --multi \ --bind='ctrl-a:toggle-all' \ diff --git a/home/dot_config/fish/functions/chshow.fish.tmpl b/home/dot_config/fish/functions/chshow.fish.tmpl index e2951bc..b2f079c 100644 --- a/home/dot_config/fish/functions/chshow.fish.tmpl +++ b/home/dot_config/fish/functions/chshow.fish.tmpl @@ -14,7 +14,7 @@ function chshow --description "Browse chezmoi managed files with fzf preview" --with-nth=4 \ --nth=1,2 \ --prompt='Chezmoi Files > ' \ - --preview='chezmoi cat {1} 2>/dev/null || echo "Preview unavailable"' \ + --preview='chezmoi cat {1} 2>/dev/null | bat -pp --color=always --file-name={1} 2>/dev/null || echo "Preview unavailable"' \ --preview-window=right:60%:wrap \ --expect='ctrl-e' \ --header='Enter: view | Ctrl+E: edit source')