1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-02 00:41:44 +02:00

moved to ./Functions/Compctl/cdmatch2

This commit is contained in:
Sven Wischnowsky 2001-04-02 12:24:38 +00:00
parent 716227e5e5
commit d3a4878b68

@ -1,15 +0,0 @@
# This function should be called from compctl to complete the
# second argument of cd and pushd.
emulate -R zsh # Requires zsh 3.0-pre4 or later
setopt localoptions extendedglob
local from
read -Ac from
from="${from[2]}"
eval "reply=( \${PWD:s@$from@$1*$2@}~$PWD(ND-/:) )"
reply=( "${${reply[@]#${PWD%%$from*}}%${PWD#*$from}}" )
[[ ${#reply[(r),-1]} != 0 ]] && reply[(r)]="''"
return