From e731010580ced89a555f46c19ac6811736e76dcf Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Thu, 25 May 2023 14:22:12 -0700 Subject: [PATCH] Convert bat from stow to chezmoi --- .../bashrc.d/bat.sh => dot_config/bash/bashrc.d/bat.sh.tmpl | 2 ++ .../env.d/bat.env => dot_config/profile/env.d/bat.env.tmpl | 2 ++ .../zsh/zshrc.d/bat.zsh => dot_config/zsh/zshrc.d/bat.zsh.tmpl | 2 ++ .../bin/executable_install-bat-home | 0 4 files changed, 6 insertions(+) rename bat/.config/bash/bashrc.d/bat.sh => dot_config/bash/bashrc.d/bat.sh.tmpl (76%) rename bat/.config/profile/env.d/bat.env => dot_config/profile/env.d/bat.env.tmpl (76%) rename bat/.config/zsh/zshrc.d/bat.zsh => dot_config/zsh/zshrc.d/bat.zsh.tmpl (62%) rename bat/.local/bin/install-bat-home => dot_local/bin/executable_install-bat-home (100%) mode change 100755 => 100644 diff --git a/bat/.config/bash/bashrc.d/bat.sh b/dot_config/bash/bashrc.d/bat.sh.tmpl similarity index 76% rename from bat/.config/bash/bashrc.d/bat.sh rename to dot_config/bash/bashrc.d/bat.sh.tmpl index f95eb57..3ccf789 100644 --- a/bat/.config/bash/bashrc.d/bat.sh +++ b/dot_config/bash/bashrc.d/bat.sh.tmpl @@ -1,3 +1,4 @@ +{{ if lookPath "bat" -}} #!/usr/bin/env bash alias batdiff='batdiff --pager=""' @@ -5,3 +6,4 @@ alias batdiff='batdiff --pager=""' if command -v bat &> /dev/null ; then alias cat=bat fi +{{- end }} diff --git a/bat/.config/profile/env.d/bat.env b/dot_config/profile/env.d/bat.env.tmpl similarity index 76% rename from bat/.config/profile/env.d/bat.env rename to dot_config/profile/env.d/bat.env.tmpl index 2fda846..ec6de4a 100644 --- a/bat/.config/profile/env.d/bat.env +++ b/dot_config/profile/env.d/bat.env.tmpl @@ -1,5 +1,7 @@ +{{ if lookPath "bat" -}} #shellcheck disable=SC2034 BAT_PAGER=never BAT_STYLE=plain BAT_THEME=zenburn MANPAGER="sh -c 'col -bx | bat -l man -p'" +{{- end }} diff --git a/bat/.config/zsh/zshrc.d/bat.zsh b/dot_config/zsh/zshrc.d/bat.zsh.tmpl similarity index 62% rename from bat/.config/zsh/zshrc.d/bat.zsh rename to dot_config/zsh/zshrc.d/bat.zsh.tmpl index 0068d8e..43894a7 100644 --- a/bat/.config/zsh/zshrc.d/bat.zsh +++ b/dot_config/zsh/zshrc.d/bat.zsh.tmpl @@ -1,3 +1,5 @@ +{{ if lookPath "bat" -}} if command -v bat &> /dev/null ; then alias cat=bat fi +{{- end }} diff --git a/bat/.local/bin/install-bat-home b/dot_local/bin/executable_install-bat-home old mode 100755 new mode 100644 similarity index 100% rename from bat/.local/bin/install-bat-home rename to dot_local/bin/executable_install-bat-home