[Fix] Fix trailing whitespace in `nvm ls-remote`
parent
f60edbb6b4
commit
acbdd9a3fa
16
nvm.sh
16
nvm.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue