-
Notifications
You must be signed in to change notification settings - Fork 13
/
man
executable file
·31 lines (26 loc) · 1017 Bytes
/
man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
# Force using the ~/bin/less wrapper for LESS_TERMCAP overrides.
if [ ! "$PAGER" ] && [ ! "$MANPAGER" ]; then
export PAGER="less"
fi
# Disable "new" rendering mode in grotty(1) so that the LESS_TERMCAP overrides
# would work. (Note: Debian already disables this by default and adds GROFF_SGR
# to un-do that, so let's honor that here as well.)
if [ ! "$GROFF_SGR" ]; then
export GROFF_NO_SGR=1
fi
# Initialize to (approximately) the default 'man -r' value
export MANLESS="?ltline %lt?L/%L.:byte %bB?s/%s..?pB (%pB\\%). "
# Set terminal title to "manpage(section)".
#case $TERM in
# xterm*)
# export MANLESS="${MANLESS}$(printf '\e]0;$MAN_PN\a')";;
# tmux*)
# export MANLESS="${MANLESS}$(printf '\ek$MAN_PN\e\\\\')";;
# *)
# export MANLESS="\$MAN_PN ${MANLESS}";;
#esac
# Unfortunately, less v591 broke the use of \e in prompt strings -- so it works
# on Fujitsu but not on any of my other machines -- therefore disable it for now.
export MANLESS="\$MAN_PN ${MANLESS}"
exec /usr/bin/man "$@"