From a17a04075a3dc42afe5530c569e89b353079830a Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Thu, 7 Dec 2023 18:19:31 +0530 Subject: [PATCH] Fix wrong variable name --- wish.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wish.sh b/wish.sh index 6f56750..3b6bcda 100644 --- a/wish.sh +++ b/wish.sh @@ -84,13 +84,13 @@ function color_to_escape_code() { if [[ $color == -1 ]]; then echo "\[\033[0;5;0m\]" else - if [[ ${#fg_code} -eq 6 ]]; then + if [[ ${#color} -eq 6 ]]; then local r=$(( 16#${color:0:2} )) local g=$(( 16#${color:2:2} )) local b=$(( 16#${color:4:2} )) echo "\[\033[${choice}8;2;$r;$g;${b}m\]" else - echo "\[\033[${choice}8;5;${fg_code}m\]" + echo "\[\033[${choice}8;5;${color}m\]" fi fi }