mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-06-20 03:37:41 +02:00
batman: Add support for MANPAGER environment variable
This commit is contained in:
parent
4b17464c6e
commit
5cbbbb6ebc
@ -12,6 +12,17 @@ A script that allows bat to be used as a manual highlighter.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
**Environment:**
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| ---------- | ------------------------------------------------------------ |
|
||||||
|
| `MANPAGER` | Changes the pager used for `batman`. This is treated like `BAT_PAGER`, but only affects this command. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
None so far.
|
None so far.
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
LIB="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo ".")")/../lib" && pwd)"
|
LIB="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo ".")")/../lib" && pwd)"
|
||||||
BAT="bat"
|
BAT="bat"
|
||||||
|
if [[ -n "${MANPAGER}" ]]; then BAT_PAGER="$MANPAGER"; fi
|
||||||
source "${LIB}/pager.sh"
|
source "${LIB}/pager.sh"
|
||||||
source "${LIB}/print.sh"
|
source "${LIB}/print.sh"
|
||||||
source "${LIB}/opt.sh"
|
source "${LIB}/opt.sh"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user