From: Siraaj Khandkar Date: Fri, 29 Jul 2022 18:53:31 +0000 (-0400) Subject: Make a bar constructor function X-Git-Url: https://git.xandkar.net/?p=khome.git;a=commitdiff_plain;h=52045fbdc9797a11edfcf8bbc665252bbcdb5d39 Make a bar constructor function --- diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 193f4be..97de4b9 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -425,6 +425,14 @@ gh_clone_repo() { git clone "$1" } +bar() { + local -r len="${1:-79}" # 1st arg or 79. + local -r char="${2:--}" # 2nd arg or a dash. + for _ in {1.."$len"}; do + printf '%c' "$char"; + done +} + daily_todo_file_template() { cat << EOF ===============================================================================