diff --git a/utilities/utilities.plugin.zsh b/utilities/utilities.plugin.zsh index e6fd8c7..946c3da 100644 --- a/utilities/utilities.plugin.zsh +++ b/utilities/utilities.plugin.zsh @@ -25,6 +25,16 @@ extract() { fi } +if which bat &> /dev/null; then + # Wrap bat to specify a theme, always enable color, pipe the output to less. + # Both --theme and --color can be specified multiple times and will override + # these defaults. + bat() { + command bat --theme='Solarized (dark)' --color always \ + --paging always --pager 'less -R' "$@" + } +fi + if which docker-machine &> /dev/null; then # Wrap the docker command to print a message if a docker-machine is not # running, rather than just stating it can not find it's socket.