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.

zsh is recommended all over the place and is supposed to be one of the more advanced shells out there. Why then I find it that zsh autocompletion lacking in many areas that I'm used to with bash?

in particular git autocompletion in zsh is very bad:

  • in bash it knows to complete branches and command options. not so in zsh
  • in zsh it doesn't even complete filenames after many 'git' commands (for example git diff). duh!
share|improve this question

closed as not constructive by slhck, Oliver Salzburg, Sathya Apr 27 '12 at 7:20

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

5  
Please rephrase your question. If there is something you would like to do in zsh, ask that. Editorial comments are unnecessary, and in the case of your second bullet, inflammatory. catb.org/~esr/faqs/smart-questions.html –  Richard Hoskins Sep 13 '09 at 15:06

4 Answers 4

up vote 3 down vote accepted

Try upgrading to at least Zsh 4.3.10. It fixes the problems with Git aliases.

share|improve this answer

Autocompletion for git is not a bash-builtin functionality, but an additional "third-party plugin" using the basic autocomplete system of the shell, which you happen to have installed (AFAIK it is a part of the git install).

For zsh there either exists no similar autocomplete file or you don't have it installed.

Nevertheless, this says nothing about the quality of either shell, it just means that someone took the effort to create this for the bash, but for zsh no one wanted to (or you just don't have it installed).

share|improve this answer

You are wrong, zsh does complete branches, options and files, at least in ALT Linux and Debian.

share|improve this answer

I'm a really new user of zsh but one of the first things I installed was oh-my-zsh. It is a community-driven collection of plugins, themes and other awesome stuff. It has a solid set of default settings that have "just worked" for me.

It makes for a fun experience since with zsh's awesome completion system managing local and remote branches is a lot clearer.

My version is from the standard Ubuntu repositories: zsh 4.3.11 (x86_64-unknown-linux-gnu). I suggest you try oh-my-zsh out to see if it works for you out of the box like it did for me.

share|improve this answer

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