mirror of
https://github.com/Xevion/dotfiles.git
synced 2026-01-31 06:24:13 -06:00
feat: enhance chezmoi fzf tools with bat syntax highlighting for diffs/file previews
This commit is contained in:
@@ -23,7 +23,7 @@ function chai --description "Interactive chezmoi apply with fzf diff preview"
|
|||||||
--with-nth=4 \
|
--with-nth=4 \
|
||||||
--nth=1 \
|
--nth=1 \
|
||||||
--prompt='Apply Changes > ' \
|
--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 \
|
--preview-window=right:60%:wrap \
|
||||||
--multi \
|
--multi \
|
||||||
--bind='ctrl-a:toggle-all' \
|
--bind='ctrl-a:toggle-all' \
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function chshow --description "Browse chezmoi managed files with fzf preview"
|
|||||||
--with-nth=4 \
|
--with-nth=4 \
|
||||||
--nth=1,2 \
|
--nth=1,2 \
|
||||||
--prompt='Chezmoi Files > ' \
|
--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 \
|
--preview-window=right:60%:wrap \
|
||||||
--expect='ctrl-e' \
|
--expect='ctrl-e' \
|
||||||
--header='Enter: view | Ctrl+E: edit source')
|
--header='Enter: view | Ctrl+E: edit source')
|
||||||
|
|||||||
Reference in New Issue
Block a user