Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch does not take advantage of git-completion #35

Closed
jamiew opened this issue Aug 23, 2013 · 4 comments
Closed

branch does not take advantage of git-completion #35

jamiew opened this issue Aug 23, 2013 · 4 comments

Comments

@jamiew
Copy link
Collaborator

jamiew commented Aug 23, 2013

https://github.com/git/git/blob/master/contrib/completion/git-completion.bash

I want to go to there

If you have homebrew on a mac, run:

source /usr/local/etc/bash_completion.d/git-completion.bash

And now typing git checkout mybr[tab] turns into git checkout mybranch

git-friendly branch should take advantage

@jamiew
Copy link
Collaborator Author

jamiew commented Jun 5, 2017

3 years later this is my favorite wishlist item for git-friendly.

I still use git checkout specifically for the completion, and just use branch for making new branches

@sapegin
Copy link
Collaborator

sapegin commented Sep 26, 2017

Looks like it’s quite easy with zsh:

fpath=($(brew --prefix)/share/zsh/functions $fpath)
autoload -Uz _git && _git
compdef __git_branch_names branch

@jamiew
Copy link
Collaborator Author

jamiew commented Sep 27, 2017

Oh that's awesome. I found something similar for bash. Do you think it's worth adding?

@sapegin
Copy link
Collaborator

sapegin commented Sep 27, 2017

I’ll add it ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants