From aba4346a8633b2185f0b866a4f43a209c660a40a Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Wed, 11 Dec 2013 13:40:56 +0100 Subject: [PATCH] Universal test of unsetopt command According to http://stackoverflow.com/a/7522866/189431 it should work in "bash, zsh, ksh and sh (as provided by dash)". --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 7feee24..059334b 100755 --- a/nvm.sh +++ b/nvm.sh @@ -9,7 +9,7 @@ # Make zsh glob matching behave same as bash # This fixes the "zsh: no matches found" errors -if [ ! -z "$(which unsetopt 2>/dev/null)" ]; then +if type "unsetopt" > /dev/null; then unsetopt nomatch 2>/dev/null NVM_CD_FLAGS="-q" fi