Skip to content

Git branch completion doesn't work #7459

@jytug

Description

@jytug

Hey, I have browsed a number of threads regarding this beyond counting.

I want to be able to hit <TAB> after git checkout and see a list of the local
branches that exist in my repository. I was told this would work as-is when I installed
zsh and oh-my-zsh from brew. It didn't, so I tried to debug it in the following ways:

  1. Added git to my plugins. Then I investigated and it only defines a list of aliases
  2. Added gitfast to my plugins. It ships with a git-completion.bash script, but it never sources it anywhere
  3. Tried downloading those scripts: git-completion.bash and git-completion.zsh and sourcing the latter.
    I also tried each of those steps after removing ~/.zcompdump*.

Perhaps someone with a deeper insight could help. Attachments:

my .zshrc

The tab completion suggests file names for checkout:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: not our issueIssue or pull request not related to Oh My ZshSupportRequest for supportTopic: completionPull Request or issue regarding completion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions