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