[Fix] `bash_completion`: be robust when `cd` is overridden

Gilad Barnea 2021-09-13 15:26:40 +03:00 committed by Jordan Harband
parent 59532c74c6
commit d91087c333
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
1 changed files with 1 additions and 1 deletions

View File

@ -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"
}