* relative filename completion
@ 1998-02-19 22:14 Stefan `Sec` Zehl
1998-02-20 8:51 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Stefan `Sec` Zehl @ 1998-02-19 22:14 UTC (permalink / raw)
To: zsh-users
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: relative filename completion
1998-02-19 22:14 relative filename completion Stefan `Sec` Zehl
@ 1998-02-20 8:51 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 1998-02-20 8:51 UTC (permalink / raw)
To: Stefan `Sec` Zehl, Zsh users list
Stefan `Sec` Zehl wrote:
> 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.
The version zsh-3.1.2-zefram3 has the '-W dir' option which does
exactly this. Unfortunately it's not part of an official release yet,
since the archive manager is refusing to testify, as it were. With a
bit of luck (or special prosecution?) this will eventually appear.
--
Peter Stephenson <pws@ifh.de> Tel: +39 50 911239
WWW: http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-02-20 9:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-19 22:14 relative filename completion Stefan `Sec` Zehl
1998-02-20 8:51 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).