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 use setopt menu_complete so that I can hit TAB repeatedly to get different filename completions in zsh. However, I would also like to be able to type:

ls ~/*.txt<TAB>

and then use TAB to cycle through all the files that end with .txt in my home directory. I do not want all matches to be inserted on the command line at once!

(I tried reading the relevant zsh man pages, but I think it could easily take me a week of reading just to figure out whether this is possible and perhaps another week to figure out how.)

share|improve this question
up vote 1 down vote accepted

You want the GLOB_COMPLETE option (see zshoptions). (By the way, this zsh reference card is quite useful.)

share|improve this answer
Perfect!! Thanks! I'm sure the reference card will come in handy. Somehow, I'm not at all surprised by the reference "card" being 14 pages long. :) – Aaron B. May 1 '12 at 4:15

You must log in to answer this question.

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