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

RE: globbing



> well i'm sorry if this is a dumb question, but i really did rtfm...
just
> haven't been able to figure this one out for a while....
> 
> in bash if it hit
> % cd /home/* and hit tab, it just sits there (although i can tab
complete
> other stuff)
> 
> in zsh, it'll split out the whole list unless i put the slash after
the
> asterisk, which can get pretty messy
> 
> % cd /home/abuse /home/andrewh /home/ben /home/brad /home/brett
> /home/brian
> /home/charis /home/dadmin ...... and so on and so forth
> 
> glob_complete is almost what i want, only ideally i'd like it to not
> display
> the entire array.
> 

Can you be more precise? You want complete glob patterns but do not want
to see completion list? You do not want to see completion listing always
or only in case of completing patterns?

To switch listing off use setopt nolist and probably nomenu, noautomenu.
I guess you know it. To switch list off only for patterns you need to
use new completion and set styles something like ...

... Oops! I was about to say that you need to use

zstyle ':completion::match:*' list off

But I realized that listing is not controlled by style. How weird.
Actually, according to documentation, the

zstyle ':completion::match:*' menu off

must work but does not.

> i think the second question has been brought up before, but is there a
way
> to
> do:
> % cd /usr/l<tab>bin
> and have that complete to /usr/local/bin as in bash (without putting a
> space
> after /usr?
> 
> i do have complete_in_word set, but that's not exactly the same
thing...
> 

What's the difference? 

> i love zsh, but there are a few little things that i still haven't
been
> able
> to aproximate.  i'm sure i'll get over it eventually....
>

Why do you want to do it "bash style" with zsh? E.g. using zsh it is
much better to do

ls /u/l/bTAB

and get it completed to /usr/local/bin. Easier, is not it?

-andrej



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