* choice of case in tab completions
@ 2006-05-06 2:07 Anthony Heading
2006-05-06 12:31 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: Anthony Heading @ 2006-05-06 2:07 UTC (permalink / raw)
To: zsh-users
Hi,
I don't know if this is behind the times, but I
have a line:
compctl -M 'm:{a-z}={A-Z} m:{A-Z}={a-z}'
in zshrc to induce case insensitive completion.
It works very well with one exception, where e.g. I
might have three files with the names
include
INSTALL
InstallBin.dsp
(this example in fact comes from the Apache httpd root dir)
When I want to read the INSTALL file, I type:
% more ins<TAB>
which sadly completes to:
% more Install
I don't know why it chooses that case variant, but it seems
clearly suboptimal. A more helpful resolution would be
to copy the case of a fully completed match - in this case
INSTALL.
Is there a way to configure zsh to do this, or a patch, or
a pointer to the right area of the code to look at?
Thanks
Anthony
This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: choice of case in tab completions
2006-05-06 2:07 choice of case in tab completions Anthony Heading
@ 2006-05-06 12:31 ` Peter Stephenson
0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2006-05-06 12:31 UTC (permalink / raw)
To: Zsh users list
Anthony Heading wrote:
> I don't know if this is behind the times, but I
> have a line:
> compctl -M 'm:{a-z}={A-Z} m:{A-Z}={a-z}'
> in zshrc to induce case insensitive completion.
>
> It works very well with one exception, where e.g. I
> might have three files with the names
> include
> INSTALL
> InstallBin.dsp
>
> (this example in fact comes from the Apache httpd root dir)
>
> When I want to read the INSTALL file, I type:
>
> % more ins<TAB>
>
> which sadly completes to:
>
> % more Install
Surely this is because the match is ambiguous? It doesn't know whether
you want INSTALL or Install.bin and has to pick the characters from one
or other. You will need some other feature of zsh, such as
menucompletion, to fix that. With my settings (with menucompletion) it
shows me InsTALL which is a sign it hasn't resolved what it's completing
yet. (I was trying this with the new completion system, however.)
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: choice of case in tab completions
[not found] ` <20060507063724.GA24554@griboedov>
@ 2006-05-07 13:31 ` Peter Stephenson
0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2006-05-07 13:31 UTC (permalink / raw)
To: Zsh users list
Anthony Heading wrote:
> On Sat, May 06, 2006 at 01:31:16PM +0100, Peter Stephenson wrote:
> > Surely this is because the match is ambiguous? It doesn't know whether
> > you want INSTALL or Install.bin and has to pick the characters from one
> > or other.
>
> Yes, sure. So I'd like it always to pick the fully-completed one (i.e. the
> shortest match) because that's the only one which is immediately useful.
Aha. I hadn't quite got that. Setting REC_EXACT should probably fix
this, but it looks like it still doesn't get the case right, at least in
my limited attempts. This may be a bug, although I don't usually use
that option, so I'm not sure.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-07 13:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-06 2:07 choice of case in tab completions Anthony Heading
2006-05-06 12:31 ` Peter Stephenson
[not found] <ajrh@ajrh.net>
[not found] ` <20060507063724.GA24554@griboedov>
2006-05-07 13:31 ` Peter Stephenson
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).