Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added git auto complete for git commands ,keywords and branch-names. #18

Closed
wants to merge 1 commit into from

6 participants

@nodemaker

For example if you type "git ch" and then press tab you will get three choices
checkout cherry cherry-pick

if you type "git checkout" and then press tab you will get
FETCH_HEAD HEAD ORIG_HEAD master origin/HEAD origin/master

(In this case I had only branch master)

@ProLoser

+1

@richo

This is pretty amazingly targeted, is it really general enough to warrant going into this project?

@renstrom

Why not just use bash-completion (installed via Homebrew) instead of sourcing git-completion? Installing Git via Homebrew actually already installs git-completion.bash for use in bash-completion.

@mathiasbynens

@renstrom Interesting! This would boil down to adding a conditional source $(brew --prefix)/etc/bash_completion to .bash_profile.

@renstrom

Correct!

Might want to consider a conditional though since most non-osx systems install bash-completion to /usr/share/bash-completion/bash_completion.

@daniran daniran referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@hkdobrev

I think this is pretty useful. Actually full-time usage of git from command line is quite hard without it.

When I installed git via brew it added the completion file to /usr/local/etc/bash_completion.d.

The 'contrib' directory has been installed to:
/usr/local/share/git-core/contrib

Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completion has been installed to:
/usr/local/share/zsh/site-functions

I think /usr/share is used by default from the make installer. But since git is installed via .brew in these dotfiles it would be better to use the location which brew uses.

@desimone desimone referenced this pull request from a commit
@kylewest kylewest Merge branch 'master' into simple-automated-install
* master:
  Fix ctrlp settings that conflict with Fugitive [closes #18]
00e0886
@bennewton999 bennewton999 referenced this pull request from a commit in bennewton999/dotfiles
@sapid sapid Fixed minor typo. Closes gh-18. da5a78e
@marshnmedia marshnmedia referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@mathiasbynens

This is now fixed. Thanks for the suggestion + discussion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 11, 2011
  1. Added git completion

    samyzee authored samyzee committed
Something went wrong with that request. Please try again.