From 03bc179ce8133d703bc9734666603a5714bfe028 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 2 Apr 2022 12:38:44 -0500 Subject: Remove dependency on tput --- bash/man.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bash') 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 # 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 "$@" + local width=$COLUMNS # bashism! + [ $width -gt $MANWIDTH ] && width=$MANWIDTH + env MANWIDTH=$width man "$@" } -- cgit 1.4.1-21-gabe81