I have got used to using tab-autocompleting inside braces without expanding in zsh. This was possible, while I used zsh with a basic grml-config. Since I migrated to oh-my-zsh, I can't reproduce this behaviour.


$ touch dir/{some_file,other_f<TAB>}

The behaviour I want:

$ touch dir/{some_file,other_file}

The behaviour I get:

$ touch dir/some_file dir/other_f

Instead of autocompleting, a tab expands the braces, defeating the purpose of the brace expansion, whenever I tab for any of the filenames.

I have searched for an answer in the manpages and the zsh-sites for anything relevant, but I couldn't find anything satisfying. Since I am still fresh to zsh, I am not sure, what to look for exactly, though.

I would appreciate any pointers on where to find any explanations relevant to this question. Thank you in advance for any helpful input!

  • That's not the default zsh behavior. It's presumably something that oh-my-zsh does. I don't know what option would do this. – Gilles Sep 23 '12 at 2:03
  • Are you sure it's not because the braces are closed, when they are still open I get the behavior you want. – Thor Sep 23 '12 at 11:10

As Thor pointed out in his comment, the autocompletion in braces only works, until you put the closing brace.


  • touch dir/{some_file,other_f<TAB>(without the closing brace!) autocompletes the filename, so you get touch dir/{some_file,other_file

  • touch dir/{some_file,other_f<TAB>}(with the closing brace!) expands the braces first, so you get touch dir/some_file dir/other_f

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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