Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Perl completion problem
- X-seq: zsh-users 7598
- From: Daniel Muino <daniel@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Perl completion problem
- Date: Wed, 23 Jun 2004 11:45:16 -0700
- In-reply-to: <Pine.LNX.4.44.0406230001230.28797-100000@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040623001217.GA6456@xxxxxxxxx> <Pine.LNX.4.44.0406230001230.28797-100000@xxxxxxxxxxxxxxxxxx>
On Wed, Jun 23, 2004 at 12:05:19AM -0700, Bart Schaefer wrote:
> On Tue, 22 Jun 2004, Daniel Muino wrote:
>
> > If I set the file-sort to anything other than 'name' every time I hit
> > <TAB> I get no matches for 'Perl script'
>
> There's a bug in the _path_files completion function. See zsh-workers
> article 19867, which refers back to 19839 and 19842.
>
Thanks Bart.
I'm using now a _path_files completion function that has PSW's patch, and it's
working great.
Daniel
--- _path_files.orig 2003-05-08 03:30:49.000000000 -0700
+++ _path_files 2004-06-23 11:43:37.000000000 -0700
@@ -120,7 +120,9 @@
tmp2=()
for tmp1 in "$pats[@]"; do
- if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
+ if [[ "$tmp1" = (#b)(*[^\$])"(#q"(*)")" ]]; then
+ tmp2=( "$tmp2[@]" "${match[1]}(#q${sort}${match[2]})" )
+ elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
tmp2=( "$tmp2[@]" "${match[1]}((${sort}${match[2][3,-1]}" )
elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then
tmp2=( "$tmp2[@]" "${match[1]}(${sort}${match[2][2,-1]}" )
@@ -168,7 +170,9 @@
fi
tmp2=()
for tmp1 in "$pats[@]"; do
- if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
+ if [[ "$tmp1" = (#b)(*[^\$])"(#q"(*)")" ]]; then
+ tmp2=( "$tmp2[@]" "${match[1]}(#q${tmp3}${match[2]})" )
+ elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
tmp2=( "$tmp2[@]" "${match[1]}((${tmp3}${match[2][3,-1]}" )
elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then
tmp2=( "$tmp2[@]" "${match[1]}(${tmp3}${match[2][2,-1]}" )
Messages sorted by:
Reverse Date,
Date,
Thread,
Author