From 722a564ffb710a630f18eb4cdba17fc89a70db63 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Mon, 31 Mar 2014 03:18:03 -0700 Subject: [PATCH] Fix potential infinite loop --- z.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/z.sh b/z.sh index 017435a..5f19bd9 100644 --- a/z.sh +++ b/z.sh @@ -113,7 +113,7 @@ _z() { t) local typ="recent";; esac; opt=${opt:1}; done;; *) local fnd="$fnd${fnd:+ }$1";; - esac; local last=$1; [ "$2" ] && shift; done + esac; local last=$1; [ "$#" -gt 0 ] && shift; done [ "$fnd" -a "$fnd" != "^$PWD " ] || local list=1 # if we hit enter on a completion just go there