[Fix] `bash_completion`: be robust when `cd` is overridden
parent
59532c74c6
commit
d91087c333
|
@ -58,7 +58,7 @@ __nvm_aliases() {
|
|||
declare aliases
|
||||
aliases=""
|
||||
if [ -d "${NVM_DIR}/alias" ]; then
|
||||
aliases="$(cd "${NVM_DIR}/alias" && command find "${PWD}" -type f | command sed "s:${PWD}/::")"
|
||||
aliases="$(command cd "${NVM_DIR}/alias" && command find "${PWD}" -type f | command sed "s:${PWD}/::")"
|
||||
fi
|
||||
echo "${aliases} node stable unstable iojs"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue