head	3.1;
branch	3.1.1;
access;
symbols;
locks;
comment	@# @;


3.1
date	96.10.30.23.41.13;	author hzoli;	state Exp;
branches
	3.1.0.0
	3.1.1.0;
next	3.0;

3.0
date	96.10.30.23.39.35;	author hzoli;	state Exp;
branches
	3.0.1.0;
next	;

3.0.1.0
date	96.10.30.23.40.21;	author hzoli;	state Exp;
branches;
next	;

3.1.0.0
date	96.10.30.23.41.58;	author hzoli;	state Exp;
branches;
next	;

3.1.1.0
date	96.12.21.02.35.24;	author hzoli;	state Exp;
branches;
next	;


desc
@A completion function for the second argument of cd/pushd
@


3.1
log
@# branch point
@
text
@# 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
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
@


3.1.1.0
log
@#
@
text
@@


3.1.0.0
log
@# create 3.1.0 branch
@
text
@@


3.0
log
@# bounce the revision numbers to 3.0
@
text
@@


3.0.1.0
log
@# create 3.0.1 branch
@
text
@@
