Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

When I type:

git log p<tab>

In Bash it expands it to git log production/master (if there's only one branch at existing production remote).

How can I have zsh behave like that?


This does not work either:

git sub<tab>

(it should complete to git submodule).

share|improve this question
up vote 1 down vote accepted

It seems zsh version 4.3.10 had some troubles with that. Upgrading to 4.3.12 solved it!

share|improve this answer
I followed your advice and compiled the latest version. Mine is zsh 4.3.15-dev-0 (x86_64-unknown-linux-gnu) now. Though, I still cannot autocomplete git submodule. – JJD Feb 10 '12 at 16:39
I've installed a precompiled package from a user's PPA for Ubuntu. Guess it might have git completions in this package as well. – Paweł Gościcki Feb 11 '12 at 9:56
Chris Johnson describes how you can configure zsh to add autocompletion. I applied the default settings which makes autocompletion on `git submodule? working. – JJD Feb 11 '12 at 11:49

Your Answer


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.