mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 11:50:38 +01:00
Fix for parse error - Issue #134
Conditional operator [[ ]] tests files and strings. To test error codes returned from command, use if statement directly without any operators.
This commit is contained in:
@@ -540,7 +540,7 @@ prompt_nvm() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local nvm_prompt
|
local nvm_prompt
|
||||||
if [[ $(type nvm >/dev/null 2>&1) ]]; then
|
if type nvm >/dev/null 2>&1; then
|
||||||
nvm_prompt=$(nvm current 2>/dev/null)
|
nvm_prompt=$(nvm current 2>/dev/null)
|
||||||
[[ "${nvm_prompt}x" == "x" ]] && return
|
[[ "${nvm_prompt}x" == "x" ]] && return
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user