bat-extras/src/batman.sh

22 lines
776 B
Bash
Raw Normal View History

2019-09-08 00:19:12 +02:00
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# bat-extras | Copyright (C) 2019 eth-p | MIT License
#
# Repository: https://github.com/eth-p/bat-extras
# Issues: https://github.com/eth-p/bat-extras/issues
# -----------------------------------------------------------------------------
2019-10-23 00:03:58 +02:00
LIB="$(cd "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)/../lib"
BAT="bat"
2019-09-08 00:19:12 +02:00
source "${LIB}/print.sh"
source "${LIB}/opt.sh"
source "${LIB}/version.sh"
# -----------------------------------------------------------------------------
export MANPAGER='sh -c "col -bx | '"$(printf "%q" "$BAT")"' --language man --style grid"'
2019-09-08 00:19:12 +02:00
export MANROFFOPT='-c'
export BAT_PAGER="$PAGER"
command man "$@"
exit $?