cleanup theme

This commit is contained in:
Michael Bradley, Jr 2018-08-01 11:24:45 -05:00
parent 3653afc45f
commit b8f4b0ce89
1 changed files with 11 additions and 6 deletions

17
env/nodez.theme.bash vendored
View File

@ -18,16 +18,21 @@ __nodez_ne() {
if [[ -v NODE_VIRTUAL_ENV ]]; then if [[ -v NODE_VIRTUAL_ENV ]]; then
env="${NODE_VIRTUAL_ENV##*/}" env="${NODE_VIRTUAL_ENV##*/}"
fi fi
if [[ -v NODE_VERSION ]]; then if [[ "$env" != "" ]]; then
[ "$env" != "" ] && echo "[${bold_yellow}$env${normal}" env="[${bold_yellow}$env${normal}"
else if [[ ! -v NODE_VERSION ]]; then
[ "$env" != "" ] && echo "[${bold_yellow}$env${normal}]" env+="]"
fi
echo "$env"
fi fi
} }
__nodez_nv() { __nodez_nv() {
[[ -v NODE_VERSION ]] \ if [[ -v NODE_VERSION ]]; then
&& echo "${__nodez_char_node}${NODE_VERSION}${__nodez_char_npm}${NPM_VERSION}]" local nv="${__nodez_char_node}${NODE_VERSION}"
nv+="${__nodez_char_npm}${NPM_VERSION}]"
echo "$nv"
fi
} }
__nodez_scm_prompt() { __nodez_scm_prompt() {