This commit is contained in:
pvincent
2024-03-06 09:58:43 +04:00
parent a06a05045e
commit 147f80beaa
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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"