about summary refs log tree commit diff stats
path: root/bash/man.bash
blob: 49279523aff693fe3f6706ed97b16bbc0545c209 (plain)
1
2
3
4
5
6
7
8
9
export MANWIDTH=80

# on smaller terminals, use their width
# (cf. https://wiki.archlinux.org/index.php/Man_page#Page_width)
man() {
	local width=$(tput cols)
	[ $width -gt $MANWIDTH ] && width=$MANWIDTH
	env MANWIDTH=$width man "$@"
}