about summary refs log tree commit diff stats
path: root/bash
diff options
context:
space:
mode:
authorCase Duckworth2022-04-02 12:38:44 -0500
committerCase Duckworth2022-04-02 12:38:44 -0500
commit03bc179ce8133d703bc9734666603a5714bfe028 (patch)
tree0c2f3320a9c19b96fd8862b8f5b0bde80c248792 /bash
parentAdd xinitrc, xsession to manifest (diff)
downloadetc-03bc179ce8133d703bc9734666603a5714bfe028.tar.gz
etc-03bc179ce8133d703bc9734666603a5714bfe028.zip
Remove dependency on tput
Diffstat (limited to 'bash')
-rw-r--r--bash/man.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/bash/man.bash b/bash/man.bash index 4927952..5a28066 100644 --- a/bash/man.bash +++ b/bash/man.bash
@@ -3,7 +3,7 @@ export MANWIDTH=80
3# on smaller terminals, use their width 3# on smaller terminals, use their width
4# (cf. https://wiki.archlinux.org/index.php/Man_page#Page_width) 4# (cf. https://wiki.archlinux.org/index.php/Man_page#Page_width)
5man() { 5man() {
6 local width=$(tput cols) 6 local width=$COLUMNS # bashism!
7 [ $width -gt $MANWIDTH ] && width=$MANWIDTH 7 [ $width -gt $MANWIDTH ] && width=$MANWIDTH
8 env MANWIDTH=$width man "$@" 8 env MANWIDTH=$width man "$@"
9} 9}