Make sure the color is an integer value

This commit is contained in:
ℳichiel ℛoos 2017-05-26 13:06:10 +02:00
parent 15ec6321c2
commit d8f91ab5fc
No known key found for this signature in database
GPG key ID: B8443AC4B9C7BBC3

View file

@ -22,7 +22,7 @@ function color() {
magenta|m) echo "\033[${b};35m${@}\033[0;m" ;;
cyan|c) echo "\033[${b};36m${@}\033[0;m" ;;
white|w) echo "\033[${b};37m${@}\033[0;m" ;;
*) echo "\033[${b};38;5;${color}m${@}\033[0;m" ;;
*) echo "\033[${b};38;5;$(( ${color} ))m${@}\033[0;m" ;;
esac
}