Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 0 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.