Wrap bat with additional arguments

This commit is contained in:
Kenneth Benzie 2021-03-02 20:02:30 +00:00
parent 309a8833c8
commit d91d6b3534

View File

@ -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.