ohmyzsh: _git:58: _git_commands: function definition file not found

When I use tab key to auto complete git’s subcommand, _git:58: _git_commands: function definition file not found is reported.

I tried status, push, commit commands but all failed.

system: Debian 8. git version: 2.1.4

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 28 (4 by maintainers)

Most upvoted comments

Try deleting the completion cache files: rm ~/.zcompdump* and restarting the terminal. If that doesn’t do it, please post contents of the file zsh-debug.log after running the following:

{ echo $fpath; echo; which -a _git; echo; which -a _git_commands } > zsh-debug.log

Had this problem. Fixed like so:

rm ~/.zcompdump
exec zsh -l

Bashed my head against this for a bit before realizing that I had multiple zcompdump files: ~/.zcompdump, ~/.antigen/.zcompdump, ~/.antigen/.zcompdump.zwc. Deleting all of them fixed the issue for me. I recommend doing a locate zcompdump especially if you’re running other managers for zsh.

Just a note for others, clearing the ~/.zcompdump* files worked for me on my MBP.

Perfect, lyda’s solution worked for me too. Repeating what he wrote so people don’t have to scroll up past my post.

rm ~/.zcompdump
exec zsh -l

I am using zplug(https://github.com/zplug/zplug) and happened same problem. rm ~/.zplug/zcompdump resolves for me.

For me it helped somehow just to close and reopen “terminator” terminal.