#!/bin/sh -e
#
# printinvln - print a text line inverted
#
# (i.e., invert whole line on the screen, not just the characters themselves)
# lines that wrap (i.e., are longer than one screen line) are only printed
# inverted up to and including the last character, not the whole last line.

set -u

# shellcheck disable=SC2312
printf "$(tput rev)%-${COLUMNS:-$(tput cols)}s$(tput sgr0)\\n" "$*"
