diff --git a/bash/.config/bash/bashrc.d/aliases.sh b/bash/.config/bash/bashrc.d/aliases.sh index 7b09463..6152e48 100644 --- a/bash/.config/bash/bashrc.d/aliases.sh +++ b/bash/.config/bash/bashrc.d/aliases.sh @@ -29,8 +29,3 @@ if [[ $(uname) == Linux ]]; then alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi - -if command -v bat &> /dev/null ; then - alias bat='bat --plain --theme zenburn' - alias cat='bat --style=plain --pager=never' -fi diff --git a/bat/.config/bash/bashrc.d/bat.sh b/bat/.config/bash/bashrc.d/bat.sh new file mode 100644 index 0000000..ad27953 --- /dev/null +++ b/bat/.config/bash/bashrc.d/bat.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +if command -v bat &> /dev/null ; then + alias cat='bat --pager=never' +fi diff --git a/bat/.config/profile/env.d/bat.env b/bat/.config/profile/env.d/bat.env new file mode 100644 index 0000000..f7f5376 --- /dev/null +++ b/bat/.config/profile/env.d/bat.env @@ -0,0 +1,4 @@ +#shellcheck disable=SC2034 +BAT_THEME=zenburn +BAT_STYLE=plain +MANPAGER="sh -c 'col -bx | bat -l man -p'" diff --git a/bat/.config/profile/profile.d/bat.sh b/bat/.config/profile/profile.d/bat.sh new file mode 100644 index 0000000..f15c739 --- /dev/null +++ b/bat/.config/profile/profile.d/bat.sh @@ -0,0 +1,3 @@ +batdiff () { + git diff --name-only --diff-filter=d | xargs bat --diff +}