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"
|
2019-09-09 02:43:29 +02:00
|
|
|
BAT="bat"
|
2019-09-08 00:19:12 +02:00
|
|
|
source "${LIB}/print.sh"
|
|
|
|
source "${LIB}/opt.sh"
|
|
|
|
source "${LIB}/version.sh"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
2019-09-09 02:43:29 +02:00
|
|
|
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 $?
|
|
|
|
|