File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -110,20 +110,21 @@ _z() {
110
110
111
111
else
112
112
# list/go
113
+ local echo fnd last list opt typ
113
114
while [ " $1 " ]; do case " $1 " in
114
- --) while [ " $1 " ]; do shift ; local fnd=" $fnd ${fnd: + } $1 " ; done ;;
115
- -* ) local opt=${1: 1} ; while [ " $opt " ]; do case ${opt: 0: 1} in
116
- c) local fnd=" ^$PWD $fnd " ;;
117
- e) local echo=1;;
115
+ --) while [ " $1 " ]; do shift ; fnd=" $fnd ${fnd: + } $1 " ; done ;;
116
+ -* ) opt=${1: 1} ; while [ " $opt " ]; do case ${opt: 0: 1} in
117
+ c) fnd=" ^$PWD $fnd " ;;
118
+ e) echo=1;;
118
119
h) echo " ${_Z_CMD:- z} [-cehlrtx] args" >&2 ; return ;;
119
- l) local list=1;;
120
- r) local typ=" rank" ;;
121
- t) local typ=" recent" ;;
120
+ l) list=1;;
121
+ r) typ=" rank" ;;
122
+ t) typ=" recent" ;;
122
123
x) sed -i -e " \:^${PWD} |.*:d" " $datafile " ;;
123
124
esac ; opt=${opt: 1} ; done ;;
124
- * ) local fnd=" $fnd ${fnd: + } $1 " ;;
125
- esac ; local last=$1 ; [ " $# " -gt 0 ] && shift ; done
126
- [ " $fnd " -a " $fnd " != " ^$PWD " ] || local list=1
125
+ * ) fnd=" $fnd ${fnd: + } $1 " ;;
126
+ esac ; last=$1 ; [ " $# " -gt 0 ] && shift ; done
127
+ [ " $fnd " -a " $fnd " != " ^$PWD " ] || list=1
127
128
128
129
# if we hit enter on a completion just go there
129
130
case " $last " in
You can’t perform that action at this time.
0 commit comments