You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the big one: Zsh-based git completions don't include custom git subcommands. For example, I have a git-shalector script and git sha<TAB> doesn't work with Zsh's git completions, but does work with Git's.
Both Zsh and Git complete git aliases like git full, though Zsh is a little better. I'm fine with using Git's version.
With Zsh, git <TAB> will show the aliases along with standard subcommands, and completes them as you'd expect:
$ git <TAB>
#...other output...
unpack-objects -- unpack objects from packed archive
unstage -- alias for 'reset HEAD'
up -- alias for '!git fetch origin && git rebase origin/master'
With Git, git <TAB> only shows the standard subcommands. However, if I start typing a custom alias and hit tab, like git fu<TAB>, then it autocompletes as you'd expect. I always know which alias I want to use, so I'm fine typing the first bit.
For debugging, here's how to switch between completions:
To switch to Zsh-based completion: brew uninstall --ignore-dependencies git && brew install git --without-completions, then open a new shell
To switch to Git-based completion: brew uninstall --ignore-dependencies git && brew install git, then open a new shell
The text was updated successfully, but these errors were encountered:
gabebw
changed the title
Switch back to git completion from git (not from Zsh)
Switch from Zsh's git completion to Git's git completion instead
Jun 23, 2018
Yeah yeah, #69 happened, but:
This is the big one: Zsh-based
git
completions don't include custom git subcommands. For example, I have agit-shalector
script andgit sha<TAB>
doesn't work with Zsh's git completions, but does work with Git's.The problem in Please help: why is
gc
autocompletion failing? #69 was thatgc
was broken. I now have a custom fuzzy-finder-backedgc
that I love much more than tab-completion of git branches.Both Zsh and Git complete git aliases like
git full
, though Zsh is a little better. I'm fine with using Git's version.git <TAB>
will show the aliases along with standard subcommands, and completes them as you'd expect:git <TAB>
only shows the standard subcommands. However, if I start typing a custom alias and hit tab, likegit fu<TAB>
, then it autocompletes as you'd expect. I always know which alias I want to use, so I'm fine typing the first bit.For debugging, here's how to switch between completions:
brew uninstall --ignore-dependencies git && brew install git --without-completions
, then open a new shellbrew uninstall --ignore-dependencies git && brew install git
, then open a new shellThe text was updated successfully, but these errors were encountered: