[Fix] Fix trailing whitespace in `nvm ls-remote`

Jordan Harband 2016-09-18 12:26:06 -07:00
parent f60edbb6b4
commit acbdd9a3fa
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
4 changed files with 620 additions and 620 deletions

16
nvm.sh
View File

@ -1256,20 +1256,20 @@ nvm_print_versions() {
| while read -r VERSION_LINE; do
VERSION="${VERSION_LINE%% *}"
LTS="${VERSION_LINE#* }"
FORMAT='%15s '
FORMAT='%15s'
if [ "_$VERSION" = "_$NVM_CURRENT" ]; then
if [ "${NVM_HAS_COLORS-}" = '1' ]; then
FORMAT='\033[0;32m-> %12s\033[0m '
FORMAT='\033[0;32m-> %12s\033[0m'
else
FORMAT='-> %12s *'
fi
elif [ "$VERSION" = "system" ]; then
if [ "${NVM_HAS_COLORS-}" = '1' ]; then
FORMAT='\033[0;33m%15s\033[0m '
FORMAT='\033[0;33m%15s\033[0m'
fi
elif nvm_is_version_installed "$VERSION"; then
if [ "${NVM_HAS_COLORS-}" = '1' ]; then
FORMAT='\033[0;34m%15s\033[0m '
FORMAT='\033[0;34m%15s\033[0m'
else
FORMAT='%15s *'
fi
@ -1280,17 +1280,17 @@ nvm_print_versions() {
LTS="${LTS##Latest }"
LTS_LENGTH="${#LTS}"
if [ "${NVM_HAS_COLORS-}" = '1' ]; then
LTS_FORMAT="\033[1;32m%${LTS_LENGTH}s\033[0m"
LTS_FORMAT=" \033[1;32m%${LTS_LENGTH}s\033[0m"
else
LTS_FORMAT="%${LTS_LENGTH}s"
LTS_FORMAT=" %${LTS_LENGTH}s"
fi
;;
*)
LTS_LENGTH="${#LTS}"
if [ "${NVM_HAS_COLORS-}" = '1' ]; then
LTS_FORMAT="\033[0;37m%${LTS_LENGTH}s\033[0m"
LTS_FORMAT=" \033[0;37m%${LTS_LENGTH}s\033[0m"
else
LTS_FORMAT="%${LTS_LENGTH}s"
LTS_FORMAT=" %${LTS_LENGTH}s"
fi
;;
esac