mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-07-03 05:31:17 +02:00
Use $NVM_DIR when looking for nvm in nvm_prompt_info.
Don't assume it's in $HOME
This commit is contained in:
parent
878172e920
commit
12fdf7132e
1 changed files with 1 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
# get the node.js version
|
# get the node.js version
|
||||||
function nvm_prompt_info() {
|
function nvm_prompt_info() {
|
||||||
[ -f "$HOME/.nvm/nvm.sh" ] || return
|
[[ -f "$NVM_DIR/nvm.sh" ]] || return
|
||||||
local nvm_prompt
|
local nvm_prompt
|
||||||
nvm_prompt=$(node -v 2>/dev/null)
|
nvm_prompt=$(node -v 2>/dev/null)
|
||||||
[[ "${nvm_prompt}x" == "x" ]] && return
|
[[ "${nvm_prompt}x" == "x" ]] && return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue