[Fix] add missing "command" prefix call for some commands
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Peter Dave Hello · committed by Peter Dave Hello · parent c5303a6 · Browse files · 2 files·+15 added−15 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+15 added−15 removed
- other:+15 added−15 removed
Provenance
- Commit
eab41ed- Tree
cd42c92- Author
Peter Dave Hello <hsu@peterdavehello.org>- Committer
Peter Dave Hello <hsu@peterdavehello.org>- Parent
c5303a6
2 files changed+15 added−15 removed
modified:bash_completion+1 added-1 removed
55 unmodified lines56 {57 declare aliases58 aliases=""59 if [ -d $NVM_DIR/alias ]; then60- aliases="$(cd $NVM_DIR/alias && find $PWD -type f | sed "s:$PWD/::")"60+ aliases="$(cd $NVM_DIR/alias && command find $PWD -type f | command sed "s:$PWD/::")"61 fi62 echo "${aliases} node stable unstable iojs"63 }64 28 unmodified linesmodified:nvm.sh+14 added-14 removed
448 unmodified lines449 NUM_GROUPS="$(nvm_num_version_groups "${VERSION}")"450 if [ "${NUM_GROUPS}" -lt 3 ]; then451 nvm_format_version "${VERSION%.}.0"452 else453- nvm_echo "${VERSION}" | cut -f1-3 -d.453+ nvm_echo "${VERSION}" | command cut -f1-3 -d.454 fi455 }456 457 nvm_num_version_groups() {433 unmodified lines891 if [ -z "${PATTERN}" ]; then892 PATTERN='v'893 SEARCH_PATTERN='.*'894 else895- SEARCH_PATTERN="$(echo "${PATTERN}" | sed "s#\.#\\\.#g;")"895+ SEARCH_PATTERN="$(echo "${PATTERN}" | command sed "s#\.#\\\.#g;")"896 fi897 if [ -n "${NVM_DIRS_TO_SEARCH1}${NVM_DIRS_TO_SEARCH2}${NVM_DIRS_TO_SEARCH3}" ]; then898 VERSIONS="$(command find "${NVM_DIRS_TO_SEARCH1}"/* "${NVM_DIRS_TO_SEARCH2}"/* "${NVM_DIRS_TO_SEARCH3}"/* -name . -o -type d -prune -o -path "${PATTERN}*" \899 | command sed "87 unmodified lines987 return 4988 ;;989 esac990 local SORT_COMMAND991- SORT_COMMAND='sort'991+ SORT_COMMAND='command sort'992 case "${FLAVOR}" in993- node) SORT_COMMAND='sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n' ;;993+ node) SORT_COMMAND='command sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n' ;;994 esac995 996 local PATTERN997 PATTERN="${3-}"24 unmodified lines1022 local LTS_ALIAS1023 local LTS_VERSION1024 command mkdir -p "$(nvm_alias_path)/lts"1025 nvm_echo "${VERSION_LIST}" \1026- | awk '{1026+ | command awk '{1027 if ($10 ~ /^\-?$/) { next }1028 if ($10 && !a[tolower($10)]++) {1029 if (alias) { print alias, version }1030 alias_name = "lts/" tolower($10)173 unmodified lines1204 NVM_CHECKSUM="$(command sha1sum "${1-}" | command awk '{print $1}')"1205 elif nvm_has "sha1" && ! nvm_is_alias "sha1"; then1206 NVM_CHECKSUM="$(command sha1 -q "${1-}")"1207 elif nvm_has "shasum" && ! nvm_is_alias "shasum"; then1208- NVM_CHECKSUM="$(shasum "${1-}" | command awk '{print $1}')"1208+ NVM_CHECKSUM="$(command shasum "${1-}" | command awk '{print $1}')"1209 else1210 nvm_err 'Unaliased sha1sum, sha1, or shasum not found.'1211 return 21212 fi1213 else1214 if nvm_has "sha256sum" && ! nvm_is_alias "sha256sum"; then1215- NVM_CHECKSUM="$(sha256sum "${1-}" | command awk '{print $1}')"1215+ NVM_CHECKSUM="$(command sha256sum "${1-}" | command awk '{print $1}')"1216 elif nvm_has "shasum" && ! nvm_is_alias "shasum"; then1217- NVM_CHECKSUM="$(shasum -a 256 "${1-}" | command awk '{print $1}')"1217+ NVM_CHECKSUM="$(command shasum -a 256 "${1-}" | command awk '{print $1}')"1218 elif nvm_has "sha256" && ! nvm_is_alias "sha256"; then1219- NVM_CHECKSUM="$(sha256 -q "${1-}" | command awk '{print $1}')"1219+ NVM_CHECKSUM="$(command sha256 -q "${1-}" | command awk '{print $1}')"1220 elif nvm_has "gsha256sum" && ! nvm_is_alias "gsha256sum"; then1221- NVM_CHECKSUM="$(gsha256sum "${1-}" | command awk '{print $1}')"1221+ NVM_CHECKSUM="$(command gsha256sum "${1-}" | command awk '{print $1}')"1222 elif nvm_has "openssl" && ! nvm_is_alias "openssl"; then1223- NVM_CHECKSUM="$(openssl dgst -sha256 "${1-}" | rev | command awk '{print $1}' | rev)"1223+ NVM_CHECKSUM="$(command openssl dgst -sha256 "${1-}" | rev | command awk '{print $1}' | rev)"1224 elif nvm_has "libressl" && ! nvm_is_alias "libressl"; then1225- NVM_CHECKSUM="$(libressl dgst -sha256 "${1-}" | rev | command awk '{print $1}' | rev)"1225+ NVM_CHECKSUM="$(command libressl dgst -sha256 "${1-}" | rev | command awk '{print $1}' | rev)"1226 elif nvm_has "bssl" && ! nvm_is_alias "bssl"; then1227- NVM_CHECKSUM="$(bssl sha256sum "${1-}" | command awk '{print $1}')"1227+ NVM_CHECKSUM="$(command bssl sha256sum "${1-}" | command awk '{print $1}')"1228 else1229 nvm_err 'Unaliased sha256sum, shasum, sha256, gsha256sum, openssl, libressl, or bssl not found.'1230 nvm_err 'WARNING: Continuing *without checksum verification*'1231 return552 unmodified lines1784 NVM_CPU_THREADS="$(sysctl -n hw.ncpu)"1785 elif [ "_$NVM_OS" = "_sunos" ]; then1786 NVM_CPU_THREADS="$(psrinfo | wc -l)"1787 elif [ "_$NVM_OS" = "_aix" ]; then1788- NVM_CPU_THREADS="$(lsconf|grep 'Number Of Processors:'| awk '{print $4}')"1788+ NVM_CPU_THREADS="$(lsconf | command grep 'Number Of Processors:'| command awk '{print $4}')"1789 fi1790 if ! nvm_is_natural_num "$NVM_CPU_THREADS" ; then1791 nvm_err 'Can not determine how many thread(s) we can use, set to only 1 now.'1792 nvm_err 'Please report an issue on GitHub to help us make it better and run it faster on your computer!'1468 unmodified lines