diff --git a/z.sh b/z.sh index 86cdb7c..4fc75dc 100644 --- a/z.sh +++ b/z.sh @@ -21,6 +21,7 @@ # * 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 matches instead of cd +# * z -e foo # echo the best match, don't cd # * z -c foo # restrict matches to subdirs of $PWD [ -d "${_Z_DATA:-$HOME/.z}" ] && { @@ -113,7 +114,7 @@ _z() { --) while [ "$1" ]; do shift; local fnd="$fnd${fnd:+ }$1";done;; -*) local opt=${1:1}; while [ "$opt" ]; do case ${opt:0:1} in c) local fnd="^$PWD $fnd";; - e) local echo=echo;; + e) local echo=1;; h) echo "${_Z_CMD:-z} [-cehlrtx] args" >&2; return;; l) local list=1;; r) local typ="rank";;