2021-07-29 05:44:12 -07:00
|
|
|
#!/usr/bin/env sh
|
2021-07-29 00:37:35 -07:00
|
|
|
# YES_ZSH
|
2021-07-29 05:44:12 -07:00
|
|
|
# YES_BASH
|
|
|
|
# YES_DASH
|
2021-07-29 00:37:35 -07:00
|
|
|
|
|
|
|
wipe() {
|
|
|
|
# TODO: rename because wipe(1) already exists.
|
|
|
|
[ $# -le 0 ] || { printf "%s\n" "$0: too many arguments" >&2; return 1; }
|
|
|
|
clear
|
|
|
|
clear # twice because mintty is weird
|
2021-07-29 05:44:12 -07:00
|
|
|
echo $'\033[30m\033[107m' | tr -d '$'
|
|
|
|
if [ -n "${ZSH_VERSION:-}" ]; then
|
|
|
|
printf '*%.0s' {1..$COLUMNS}
|
|
|
|
else
|
|
|
|
tput cols | awk '{for(i=0;i<$0;i++)printf "*"}'
|
|
|
|
fi
|
|
|
|
echo $'\033[0m\n' | tr -d '$'
|
2021-07-29 00:37:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
[ "${SOURCING:-0}" -gt 0 ] || wipe "$@"
|