From 3eeff4b70538535f3251cb4b58f3e18993f5172d Mon Sep 17 00:00:00 2001 From: Bruno 21 Date: Sat, 18 Apr 2020 07:20:15 +0200 Subject: [PATCH] npm.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --no-colors options: nvm list —no-colors --- plugins.d/npm.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins.d/npm.sh b/plugins.d/npm.sh index c5151ca..f7804b4 100755 --- a/plugins.d/npm.sh +++ b/plugins.d/npm.sh @@ -27,6 +27,9 @@ if [[ $1 == "--nodistract" ]]; then no_distract=true fi +# Set ls_color to '' for output nvm list in colors, else '--no-colors' +ls_color='--no-colors' + # Set doctor=true to run 'npm doctor' and 'npm cache verify' each time doctor=true @@ -77,7 +80,7 @@ if [ -f "$NVM_DIR/nvm.sh" ]; then fi fi - node_install=$(nvm list) + node_install=$(nvm list "$ls_color") echo -e "\033[4m🌿 node.js\033[0m (installed versions): \n$node_install" # homebrew @@ -96,7 +99,7 @@ elif [ -f "/usr/local/opt/nvm/nvm.sh" ]; then echo -e "or run \033[1;3mKymsu's homebrew.sh script\033[0m." fi - node_install=$(nvm list) + node_install=$(nvm list "$ls_color") echo -e "\033[4m🌿 node.js\033[0m (installed versions): \n$node_install" fi