-c option restricts matches to subdirs of cwd.

Closes #83
This commit is contained in:
rupa committed 2013-03-03 00:54:40 -05:00
1 parent b554f71399
commit 0f3f7a437f
3 files changed
+11 -4

No files matched your search

+4 -2
View File
@@ -19,7 +19,8 @@
# * z foo bar # cd to most frecent dir matching foo and bar
# * z -r foo # cd to highest ranked dir matching foo
# * z -t foo # cd to most recently accessed dir matching foo
# * z -l foo # list all dirs matching foo (by frecency)
# * z -l foo # list matches instead of cd
# * z -c foo # restrict matches to subdirs of $PWD
case $- in
*i*) ;;
@@ -100,7 +101,8 @@ _z() {
else
# list/go
while [ "$1" ]; do case "$1" in
-h) echo "${_Z_CMD:-z} [-h][-l][-r][-t] args" >&2; return;;
-c) local fnd="$PWD $fnd";;
-h) echo "${_Z_CMD:-z} [-c][-h][-l][-r][-t] args" >&2; return;;
-l) local list=1;;
-r) local typ="rank";;
-t) local typ="recent";;