zsh-workers
 help / color / mirror / code / Atom feed
* case-insensitive completion
@ 2006-03-01  9:16 Karl Chen
  2006-03-05  9:44 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Chen @ 2006-03-01  9:16 UTC (permalink / raw)
  To: zsh-workers


Hi, I use the following for case-insensitive completion:
    zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'

It has always been MUCH slower than regular completion, esp on big
directories.  With 4.3.0-dev-5 it got even worse.  This is all on
a local disk (high bandwidth, low latency SATA), though of course
the effect is magnified over NFS.

Any plans to implement case-insensitive matching natively?


-- 
Karl 2006-03-01 01:13


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: case-insensitive completion
  2006-03-01  9:16 case-insensitive completion Karl Chen
@ 2006-03-05  9:44 ` Bart Schaefer
  2006-03-05 17:24   ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2006-03-05  9:44 UTC (permalink / raw)
  To: zsh-workers

On Mar 1,  1:16am, Karl Chen wrote:
} 
} Hi, I use the following for case-insensitive completion:
}     zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
} 
} It has always been MUCH slower than regular completion, esp on big
} directories.  With 4.3.0-dev-5 it got even worse.

I suspect that if you compile with --disable-multibyte you'll at get
at least back to the speed before 4.3.0-dev-5.  I'd be curious to know
if you don't.

} Any plans to implement case-insensitive matching natively?

What do you mean "natively"?  The matcher-list matching is all done
in C, even though it's enabled via zstyle.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: case-insensitive completion
  2006-03-05  9:44 ` Bart Schaefer
@ 2006-03-05 17:24   ` Peter Stephenson
  2006-03-05 20:45     ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2006-03-05 17:24 UTC (permalink / raw)
  To: zsh-workers

Bart Schaefer wrote:
> } Any plans to implement case-insensitive matching natively?
> 
> What do you mean "natively"?  The matcher-list matching is all done
> in C, even though it's enabled via zstyle.

And, anyway, "setopt nocaseglob" already exists.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page still at http://www.pwstephenson.fsnet.co.uk/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: case-insensitive completion
  2006-03-05 17:24   ` Peter Stephenson
@ 2006-03-05 20:45     ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2006-03-05 20:45 UTC (permalink / raw)
  To: zsh-workers

On Mar 5,  5:24pm, Peter Stephenson wrote:
}
} And, anyway, "setopt nocaseglob" already exists.

That doesn't help with matching anywhere but for filenames, does it?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Case-insensitive completion
       [not found]   ` <10378.1063706957@gmcs3.local>
@ 2003-09-16 15:27     ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2003-09-16 15:27 UTC (permalink / raw)
  To: zsh-workers

[redirected to zsh-workers from zsh-users]

On Sep 16, 12:09pm, Oliver Kiddle wrote:
} Subject: Re: Case-insensitive completion
}
} Bart wrote:
} 
} > - file-patterns are not tried after the first one that has the pattern
} >   '*:...' which is why the (#I) is thrown in on globbed-files, to force
} >   attempting both globbed-files and ci-globbed-files even if the match
} >   pattern substituted by %p is '*'.
} 
} Yuk. Could you see if there was a good reason for that?

The docs have this example:

     To alter the default behaviour of file completion -- offer files
     matching a pattern and directories on the first attempt, then all
     files -- to offer only matching files on the first attempt, then
     directories, and finally all files:

          zstyle ':completion:*' file-patterns \
              '%p:globbed-files' '*(-/):directories' '*:all-files'

     This works even where there is no special pattern: _files matches
     all files using the pattern `*' at the first step and stops when it
     sees this pattern.  Note also it will never try a pattern more
     than once for a single completion attempt.

} If it is just for efficency it should perhaps be removed.

It appears to be done that way to intentionally short-circuit the process
exactly when %p is '*', so that (in the example above) no redundant group
'directories' is created when both files and directories are already in
the globbed-files group.

The correct behavior (which may be very tough to implement) would seem to
be to check the entire list of tags against the matcher style before the
loop begins, and bail at '*' only if there are no tags left with matchers.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-03-05 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-01  9:16 case-insensitive completion Karl Chen
2006-03-05  9:44 ` Bart Schaefer
2006-03-05 17:24   ` Peter Stephenson
2006-03-05 20:45     ` Bart Schaefer
     [not found] <20030914103053.GA827@strindberg.student.uu.se>
     [not found] ` <1030914185817.ZM27558@candle.brasslantern.com>
     [not found]   ` <10378.1063706957@gmcs3.local>
2003-09-16 15:27     ` Case-insensitive completion Bart Schaefer

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).