diff --git a/plugin/xlib/vimdot.sh b/plugin/xlib/vimdot.sh
index fa1b29d..3c3f6da 100755
--- a/plugin/xlib/vimdot.sh
+++ b/plugin/xlib/vimdot.sh
@@ -5,7 +5,7 @@ error() { echo "$0: $*" >&2; exit 1; }
 
 for prog in gvim vim ""; do
 	if test -x /usr/bin/$prog; then break; fi
-	if which $prog >&/dev/null; then break; fi
+	if which $prog >/dev/null 2>&1; then break; fi
 done
 
 if test -z "$prog"; then error "the editor not found"; fi
