Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion on cd
- X-seq: zsh-workers 3755
- From: opk101@xxxxxxxxxxxxx (Oliver Kiddle)
- To: borsenkow.msk@xxxxxx
- Subject: Re: Completion on cd
- Date: Sun, 1 Feb 1998 15:52:32 +0000
- Cc: Zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxxx>
- In-reply-to: borsenkow.msk@xxxxxx "Re: Completion on cd" (Feb 1, 6:12pm)
On Feb 1, 6:12pm, borsenkow.msk@xxxxxx wrote:
> On Sun, 1 Feb 1998, Oliver Kiddle wrote:
> > I tracked the problem down to this line:
> >
> > compctl -Tx 'C[0,*/*]' -f - 's[~]' -k users -S/ \
> ^^^^^^^^^^^^^^^^^
>
> Yep. -T applies *before* anything else, and you just told it, that */*
> must complete all files. I am curious, if 'cd dir1/dir2/xTAB' works
> correctly (that is, if pattern doesn't descend :-)
Yes, I didn't think about the '-f' bit and */* matching anything with a
slash in it when I took the completion out the manual. I don't
understand what you mean by the last sentence. I think the answer is
that it does work correctly.
> You would be probably better off by using -D flag. It allows you to
> override it on per-command/per-argument basis and still be applied in
> default case. In most cases it should be the same as you have, with
> exception that -/ will work :-)
I don't think that the -D flag would be better. I would then have to
program the alternative '~' expansion in for every command. Also, the -T
flags operates when completing the command itself if I run a command in
a user's directory.
> > There may well be a problem with this though it seems to work and I
> > can't see any nasty suprises but I would strongly suggest that the
> > manual is changed so that nobody else has this problem.
> Sorry, in which respect? Manual *does* say, that -T is default applied
> before anything else.
I meant that there might be a problem with my new compctl not with zsh
itself. I don't think there is though. I was thinking that there might
be some other respect where my compctl would interfere with some other
intended completion to give undesired results as I found to be the case
for the original compctl which is an example in the manual.
Another compctl problem I've had is with a compctl I'm trying to
construct for lynx based on one I have working under tcsh:
The following does not work as I would expect:
compctl -x 's[file:/]' -/g '*.html' -W '/' -- lynx
The problem seems to occur with the slash character as this does work
as expected (although it doesn't do anything useful):
compctl -x 's[file:]' -/g '*.html' -W '/' -- lynx
(As does 's[file:]' -S/ -s '`pwd`' which is the useful completion
of 'file:' only).
Oliver Kiddle
--
__
/ \|. _ _ |_/. _| _|| _ E-mail: opk101@xxxxxxxxxxxxx
\__/||\/(-| | \|(_|(_||(- Web: http://www.york.ac.uk/~opk101/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author