Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure zshell in such a way that:

$ ls *<TAB>
# results in
ls a b c d e f g <cursor>

where "a, b, .., g" are the files that match the wildcard. Instead it gives me the default completion menu.

I do however want the completion menu if there is no glob to expand. So

$ ls * | <tab>

would give me the command completion menu.

I've seen this working. But I do not really no how to configure globbing in zshell. Anyone?

share|improve this question
    
This is the default behavior with zsh 4.3.17 (both with the recommended and an empty .zshrc). Could you post the output of zstyle? – Dennis Apr 12 '13 at 18:56
    
Ah thank you. The one zshrc available online that I had not yet seen: the official example... I'll post an answer based on what I found. – A.J.Rouvoet Apr 12 '13 at 19:28
up vote 1 down vote accepted

As recommended by Dennis, I looked up the recommended default, which can be found here: offical default zshrc

I used their completion settings, and adapted them from there, so I can't tell for sure what did the trick. But I'm presuming this line was key:

# insert all expansions for expand completer
zstyle ':completion:*:expand:*' tag-order all-expansions
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .