head	2.2;
access;
symbols
	3_0_1:2.2
	3_0_0:2.1
	3_0-pre6:2.1
	3_0-pre5:2.1
	3_0-pre4:2.1
	3_0-pre3:2.1
	3_0-pre2:2.1
	3_0-pre1:2.1
	beta21:2.1
	beta20:2.1
	beta19:2.1
	beta18:2.1
	beta17:2.1
	beta16:2.0;
locks;
comment	@# @;


2.2
date	96.10.06.12.21.08;	author hzoli;	state Exp;
branches;
next	2.1;

2.1
date	96.05.05.00.39.32;	author hzoli;	state Exp;
branches;
next	2.0;

2.0
date	96.05.05.00.38.53;	author hzoli;	state Exp;
branches;
next	;


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


2.2
log
@add emulate -R zsh to some function examples.  From Bart (2172)
@
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
@


2.1
log
@A completion function for the second argument of cd/pushd
@
text
@d4 2
@


2.0
log
@New maintainer: Zoltn Hidvgi <hzoli@@cs.elte.hu>
@
text
@d1 13
@
