Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Strange bug when completing [ in file names
- X-seq: zsh-workers 20733
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Strange bug when completing [ in file names
- Date: Thu, 20 Jan 2005 19:04:15 +0100
- In-reply-to: <1050120152948.ZM4504@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <41EAE932.5070808@xxxxxxxxxxxxxx> <6483.1106219109@xxxxxxxxxxxxxxxxxxxxx> <1050120152948.ZM4504@xxxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer wrote:
>
> Doesn't that need to be
>
> (#s)(*[^\\]|)[^*?\(\)\<\>\{\}\|]*
>
> or something similar, so that a word beginning with "[[" can match?
> E.g. a word beginning with the pattern [[:alpha:].]
I did think about that. The documentation says "unless that suffix
itself contains characters eligible for expansion" so I thought I could
ignore trying to worry about an area that isn't the suffix. After
finding an example, I've concluded that it is better with your change.
The following shows the difference:
touch test/file
foo=file
: t*/$foo<tab>
: */$foo<tab>
The code doesn't only look in the suffix for "other characters eligible
for expansion" anyway. That'd be hard. Is it worth adjusting the
documentation?
There are still inconsistencies in the behaviour but people probably
don't have precise expectations if they ever try such things. Try this:
bar=test
: ./$bar/$foo<tab>
: ~/$bar/$foo<tab>
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author