Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
relative filename completion
- X-seq: zsh-users 1331
- From: Stefan `Sec` Zehl <sec@xxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: relative filename completion
- Date: Thu, 19 Feb 1998 23:14:05 +0100
- I-love-doing-this: really
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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author