bobthecow / git-flow-completion

Bash, Zsh and fish completion support for git-flow.
MIT License
2.79k stars 385 forks source link

Add bugfix branching support #45

Open rudineirk opened 8 years ago

rudineirk commented 8 years ago

petervanderdoes/gitflow-avh added bugfix branching support, it should work like a feature branch, but only for bugs

bobthecow commented 8 years ago

I'm not opposed to adding completion specifically for gitflow-avh, but I'd prefer it to be conditional on the version of gitflow the user has installed. Any ideas on how to do that so non-avh users don't get spurious completions?

petervanderdoes commented 8 years ago

Besides bugfix there are also options within existing commands that are available in petervanderdoes/gitflow-avh and not in the nvie version. So the basic solution would be to split the completions up. I don't see a big problem in that as the original gitflow doesn't seem to change anymore.

I do understand this is easier said than done.

One option to check for the AVH version would be running git flow version and checking for the string AVH.

In POSIX shell this would be:

#!/bin/sh
VERSION=`git flow version`
case "$VERSION" in
  *AVH*) isAVH="yes" ;;
  *)     isAVH="no" ;;
esac