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