|
|
@ -3,7 +3,7 @@ |
|
|
|
# Clears the entire current line regardless of terminal size. |
|
|
|
# See the magic by running: |
|
|
|
# { sleep 1; clear_this_line ; }& |
|
|
|
clear_this_line() { |
|
|
|
function clear_this_line { |
|
|
|
printf '\r' |
|
|
|
cols="$(tput cols)" |
|
|
|
for i in $(seq "$cols"); do |
|
|
@ -16,7 +16,7 @@ clear_this_line() { |
|
|
|
# Usage: erase_lines [AMOUNT] |
|
|
|
# See the magic by running: |
|
|
|
# { sleep 1; erase_lines 2; }& |
|
|
|
erase_lines() { |
|
|
|
function erase_lines { |
|
|
|
# Default line count to 1. |
|
|
|
test -z "$1" && lines="1" || lines="$1" |
|
|
|
|
|
|
|