Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

substring completion question



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.



Messages sorted by: Reverse Date, Date, Thread, Author