From 31c5c5c45a2e646bb09883af7b2c11b1abc9c561 Mon Sep 17 00:00:00 2001 From: Hosam Aly Date: Fri, 27 Nov 2020 23:17:07 +0000 Subject: [PATCH] [Fix] avoid parse error with common omz global aliases, in `nvm_print_color_code` Fixes #2362. Fixes #2372. --- nvm.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/nvm.sh b/nvm.sh index 9635062..8d57cae 100644 --- a/nvm.sh +++ b/nvm.sh @@ -785,22 +785,22 @@ nvm_get_colors() { nvm_print_color_code() { case "${1-}" in - r) nvm_echo '0;31m';; - R) nvm_echo '1;31m';; - g) nvm_echo '0;32m';; - G) nvm_echo '1;32m';; - b) nvm_echo '0;34m';; - B) nvm_echo '1;34m';; - c) nvm_echo '0;36m';; - C) nvm_echo '1;36m';; - m) nvm_echo '0;35m';; - M) nvm_echo '1;35m';; - y) nvm_echo '0;33m';; - Y) nvm_echo '1;33m';; - k) nvm_echo '0;30m';; - K) nvm_echo '1;30m';; - e) nvm_echo '0;37m';; - W) nvm_echo '1;37m';; + 'r') nvm_echo '0;31m';; + 'R') nvm_echo '1;31m';; + 'g') nvm_echo '0;32m';; + 'G') nvm_echo '1;32m';; + 'b') nvm_echo '0;34m';; + 'B') nvm_echo '1;34m';; + 'c') nvm_echo '0;36m';; + 'C') nvm_echo '1;36m';; + 'm') nvm_echo '0;35m';; + 'M') nvm_echo '1;35m';; + 'y') nvm_echo '0;33m';; + 'Y') nvm_echo '1;33m';; + 'k') nvm_echo '0;30m';; + 'K') nvm_echo '1;30m';; + 'e') nvm_echo '0;37m';; + 'W') nvm_echo '1;37m';; *) nvm_err 'Invalid color code'; return 1 ;;