From 52045fbdc9797a11edfcf8bbc665252bbcdb5d39 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Fri, 29 Jul 2022 14:53:31 -0400 Subject: [PATCH] Make a bar constructor function --- home/lib/login_functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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 =============================================================================== -- 2.20.1