mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-03-03 07:51:13 +01:00
Trim trailing whitespace
Otherwise `MANPAGER`'s trailing whitespace is escaped, which adds the next line of `export` as part of the command. ```bash export MANPAGER=env\ BATMAN_IS_BEING_MANPAGER=yes\ bash\ /usr/local/bin/batman\ export MANROFFOPT=-c ``` and you get `cat: export: No such file or directory`
This commit is contained in:
parent
01c2f9bb94
commit
32706dd581
@ -68,6 +68,7 @@ fi
|
||||
# -----------------------------------------------------------------------------
|
||||
if [[ -n "${MANPAGER}" ]]; then BAT_PAGER="$MANPAGER"; fi
|
||||
export MANPAGER="env BATMAN_IS_BEING_MANPAGER=yes bash $(printf "%q " "$SELF" "${FORWARDED_ARGS[@]}")"
|
||||
export MANPAGER="${MANPAGER%"${MANPAGER##*[![:space:]]}"}"
|
||||
export MANROFFOPT='-c'
|
||||
|
||||
# If `--export-env`, print exports to use batman as the manpager directly.
|
||||
|
Loading…
Reference in New Issue
Block a user