lib: Reduce size of term_width function

This commit is contained in:
Ethan P 2020-05-02 17:03:53 -07:00
parent 427baf1491
commit c98e21df04
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA

View File

@ -18,10 +18,6 @@ term_width() {
fi fi
# shellcheck disable=SC2155 # shellcheck disable=SC2155
local width="$(stty size 2>/dev/null | cut -d' ' -f2)" { stty size 2>/dev/null || echo "22 80"; } | cut -d' ' -f2
if [[ -z "$width" ]]; then return 0
echo "80"
else
echo "$width"
fi
} }