Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Another keep-prefix problem



Sven Wischnowsky wrote:

> I won't commit this before I get positive replies and answers to the
> question if we then should add another possible value for the
> keep-prefix style for this new behaviour or if that's not needed (I

As seems to be the consensus, I don't think we need another value for
keep-prefix for this.

This is more than likely nothing to do with the latest patch but when
I tried testing all this, things didn't work as I'd like or expect.

For _expand I use the glob 1, substitute 1, suffix 1, accept-exact
false and tag-order all-expansions styles. keep-prefix changed is
the default so that too.

To test I did:
c1=/home
c3=cvs
Now,
cd $c1/kiddleo/$c3/<tab> expands both $c1 and $c3 which I don't want.
Having typed the / after $c3, I expect it to complete subdirectories
in my ~/cvs and not do expansion.

Okay, so I tried setting keep-prefix to 1 and things start working nicely.
Except what is going on here (where I mix globs with variables):
   cd /home/kiddle?/$c3/<tab> results in:
   cd /home/kiddle?/$c3//home/kiddleo/cvs/
this definitely isn't right.

So in what situations is the changed value of keep-prefix useful for?
It sounds something like subst-globs-only from the docs. I can't
remember why I used it and not a value of 1.

Actually, talking of the docs for styles, the section on tag-order is
messed up and seems to have the same example twice.

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author