From 530082843e606f696ff542c716e2851b1adecba1 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 22 Feb 2021 15:19:22 +0100 Subject: [PATCH] Isolate variables --- .scripts/rename.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.scripts/rename.sh b/.scripts/rename.sh index 4f17c45..6db95f0 100755 --- a/.scripts/rename.sh +++ b/.scripts/rename.sh @@ -10,13 +10,12 @@ set -- emacsclient -a '' # ------------------------------------------ -# Output formatting -B=$(tput bold) -L=$(tput setf 1) # Blue -N=$(tput sgr0) - format() { - echo "${B}${L}::${N}${B} ${1}${N}" + b=$(tput bold) + blue=$(tput setf 1) + n=$(tput sgr0) + + echo "${b}${blue}::${n}${b} ${1}${n}" } cleanup() { @@ -75,7 +74,7 @@ for file in $files; do sed -i "${i}s/.*/${command}/;" "$tmpfile" > /dev/null - i=$((i+1)) + i=$((i + 1)) done # Delete empty lines