mirror of https://gitlab.com/ceda_ei/wish
Fix wrong variable name
This commit is contained in:
parent
8851af744d
commit
a17a04075a
4
wish.sh
4
wish.sh
|
@ -84,13 +84,13 @@ function color_to_escape_code() {
|
||||||
if [[ $color == -1 ]]; then
|
if [[ $color == -1 ]]; then
|
||||||
echo "\[\033[0;5;0m\]"
|
echo "\[\033[0;5;0m\]"
|
||||||
else
|
else
|
||||||
if [[ ${#fg_code} -eq 6 ]]; then
|
if [[ ${#color} -eq 6 ]]; then
|
||||||
local r=$(( 16#${color:0:2} ))
|
local r=$(( 16#${color:0:2} ))
|
||||||
local g=$(( 16#${color:2:2} ))
|
local g=$(( 16#${color:2:2} ))
|
||||||
local b=$(( 16#${color:4:2} ))
|
local b=$(( 16#${color:4:2} ))
|
||||||
echo "\[\033[${choice}8;2;$r;$g;${b}m\]"
|
echo "\[\033[${choice}8;2;$r;$g;${b}m\]"
|
||||||
else
|
else
|
||||||
echo "\[\033[${choice}8;5;${fg_code}m\]"
|
echo "\[\033[${choice}8;5;${color}m\]"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue