zsh-users
 help / color / mirror / code / Atom feed
* substring completion question
@ 2011-01-07  2:35 Andy Spiegl
  0 siblings, 0 replies; only message in thread
From: Andy Spiegl @ 2011-01-07  2:35 UTC (permalink / raw)
  To: zsh-users

Hi, one more question :-)

I'm using this wonderful matcher style:
 zstyle ':completion:*' matcher-list 'm:{A-ZÄÖÜa-zäöü}={a-zäöüA-ZÄÖÜ} m:[-_]=[-_] r:|[-_]=** r:|=*' '+l:|=*'

When friends of mine watch me typing and tabbing they get jealous and
some of them start trying zsh.  But usually they soon get frightened
off when they see what zsh does to their command line.
Examples:

$ ls
bar2-foo-baz2  bar-foo-baz  baz1-foo-bar1  baz-foo-bar

$ ls foo<tab>
$ ls ba-foo-ba
bar2-foo-baz2  bar-foo-baz    baz1-foo-bar1  baz-foo-bar

How can I setup their zsh such that it only shows unambiguous prefixes on
the command line but still shows substring-completions in the list of
possible completions?  In this case it should simply not change the
command line at all but list all 4 possible filenames.  Like so:
$ ls foo<tab>
$ ls foo
bar2-foo-baz2  bar-foo-baz    baz1-foo-bar1  baz-foo-bar

I tried
 zstyle ':completion::match:*' insert-unambiguous pattern
but that doesn't seem to make a difference.
Well, they could use menu_complete of course but then they'd need to
press the undo key to get back to their original command line.


Another a little disturbing thing is that right after starting menu
selection in interactive mode the TAB key does nothing.  After
pressing any cursor key the TAB key works again as expected
(i.e. jumping to the next entry)


Thanks!
 Andy.


-- 
 Those who reach their goals too easily have aimed too low.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-07  2:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07  2:35 substring completion question Andy Spiegl

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