mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
Merge pull request #294 from 00Davo/patch-1
Finds NVM_DIR with `cd -q` on zsh
This commit is contained in:
commit
a7a91441aa
11
nvm.sh
11
nvm.sh
@ -7,15 +7,16 @@
|
|||||||
# Implemented by Tim Caswell <tim@creationix.com>
|
# Implemented by Tim Caswell <tim@creationix.com>
|
||||||
# with much bash help from Matthew Ranney
|
# with much bash help from Matthew Ranney
|
||||||
|
|
||||||
# Auto detect the NVM_DIR
|
|
||||||
if [ ! -d "$NVM_DIR" ]; then
|
|
||||||
export NVM_DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0}) > /dev/null && pwd)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make zsh glob matching behave same as bash
|
# Make zsh glob matching behave same as bash
|
||||||
# This fixes the "zsh: no matches found" errors
|
# This fixes the "zsh: no matches found" errors
|
||||||
if [ ! -z "$(which unsetopt 2>/dev/null)" ]; then
|
if [ ! -z "$(which unsetopt 2>/dev/null)" ]; then
|
||||||
unsetopt nomatch 2>/dev/null
|
unsetopt nomatch 2>/dev/null
|
||||||
|
NVM_CD_FLAGS="-q"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Auto detect the NVM_DIR
|
||||||
|
if [ ! -d "$NVM_DIR" ]; then
|
||||||
|
export NVM_DIR=$(cd $NVM_CD_FLAGS $(dirname ${BASH_SOURCE[0]:-$0}) > /dev/null && pwd)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nvm_set_nullglob() {
|
nvm_set_nullglob() {
|
||||||
|
Loading…
Reference in New Issue
Block a user