From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25685 invoked from network); 19 Feb 1998 22:34:58 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 19 Feb 1998 22:34:58 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id RAA22539; Thu, 19 Feb 1998 17:13:40 -0500 (EST) Resent-Date: Thu, 19 Feb 1998 17:12:02 -0500 (EST) Message-ID: <19980219231405.M8189@matrix.42.org> Date: Thu, 19 Feb 1998 23:14:05 +0100 From: Stefan `Sec` Zehl To: zsh-users@math.gatech.edu Subject: relative filename completion X-Current-Backlog: 174 messages Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.90.4i I-love-doing-this: really X-URL: http://sec.42.org/ Resent-Message-ID: <"b_del1.0.aU5.ouAxq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1331 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I'm trying to get 'relative filename completion' to work - i.e. a filename completion which doesnt work relative to '.', but relative to some other Directory. ("compctl -g '~/Mail/*(:t)' mutt" is not able to complete in subdirs). So far i tried various things, and the closest i could come up with was: compctl -g '~/Mail/**/*(:s_/home/sec/Mail/__)' mutt I was told to look at "Functions/cdmatch" but that didn't work very well, too: compctl -K gkomp g gkomp () { setopt localoptions local narg pref cdp read -nc narg read -Ac pref cdp=(~/Mail) reply=(${^cdp}/${pref[$narg]%$2}*$2(-DN^M:t)) } It offers me all files/directories in ~/Mail, but I'm not able to complete files in one of these directories. If anybody could help me here? CU, Sec -- Win16, Win32s, Win32c, Win32 - Which API do you want to go today?