Browse files

Supress ZSH "no matches found" error

Fixes issue #39

ZSH's default globbing behaviour differs from Bash. If there is no
match, ZSH itself will print the error message.

This means that piping a commantd's STDERR to /dev/null will not
hide it.

By unsetting the NOMATCH option we get a behaviour similar to Bash.

Signed-off-by: Tomas Sedovic <>
  • Loading branch information...
1 parent 91670ab commit 3dd6b29905c3b35191f5b474ab3bc667ee50556e @tomassedovic tomassedovic committed Jul 7, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0
@@ -10,6 +10,10 @@ if [ ! -d "$NVM_DIR" ]; then
export NVM_DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0}) && pwd)
+# Make zsh glob matching behave same as bash
+# This fixes the "zsh: no matches found" errors
+unsetopt nomatch 2>/dev/null
# Expand a version using the version cache

0 comments on commit 3dd6b29

Please sign in to comment.