From 6eb0f3d487fd86bef323251fc829c5b86908836c Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Sat, 5 Jun 2021 18:29:27 -0500 Subject: [PATCH] Bashrc.wiki: removed code from countdown section. Just read the source --- Bashrc.wiki | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/Bashrc.wiki b/Bashrc.wiki index 937afb6..035fda3 100644 --- a/Bashrc.wiki +++ b/Bashrc.wiki @@ -121,25 +121,7 @@ https://git.thurstylark.com/vcsh/bashrc.git/tree/.bashrc.d/countdown.bash Found this little function when I wanted to add functionality to `shot()`. It takes an integer as an argument, then counts down that number of seconds visually. -{{{class="prettyprint" -countdown() { - if [ -z "$1" ]; then - printf " -countdown: Count down while printing progress on the terminal - -Usage: countdown -" - fi - local secs="$1" - while [ "$secs" -gt 0 ]; do - echo -ne "$secs\033[0K\r" - sleep 1 - : $((secs--)) - done -} -}}} - -This probably isn't the sanest or safest solution to the problem, but it gets the job done. Patches welcome. +I no longer use `countdown()` from `shot()` directly, but sometimes will in some sort of pipeline in tandem with it. I found that I want that flexibility out in the open for me to use instead of packed behind a bespoke ui for little benefit. ----