Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: fbc51c9ea7
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (11 sloc) 0.391 kB
# 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
Jump to Line
Something went wrong with that request. Please try again.