b5ead7be0169048cd2c1526728c63dc14e6cc785

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #1729 from statschner/master

Added git-flow-avh plugin

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/git-flow-avh/git-flow-avh.plugin.zsh b/plugins/git-flow-avh/git-flow-avh.plugin.zsh
  2new file mode 100644
  3index 0000000000000000000000000000000000000000..d76f55ef63bc3476a508394f37e4752a21c6df0d
  4--- /dev/null
  5+++ b/plugins/git-flow-avh/git-flow-avh.plugin.zsh
  6@@ -0,0 +1,416 @@
  7+#!zsh
  8+#
  9+# Installation
 10+# ------------
 11+#
 12+# To achieve git-flow completion nirvana:
 13+#
 14+#  0. Update your zsh's git-completion module to the newest verion.
 15+#     From here. http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD
 16+#
 17+#  1. Install this file. Either:
 18+#
 19+#     a. Place it in your .zshrc:
 20+#
 21+#     b. Or, copy it somewhere (e.g. ~/.git-flow-completion.zsh) and put the following line in
 22+#        your .zshrc:
 23+#
 24+#            source ~/.git-flow-completion.zsh
 25+#
 26+#     c. Or, use this file as a oh-my-zsh plugin.
 27+#
 28+
 29+_git-flow ()
 30+{
 31+	local curcontext="$curcontext" state line
 32+	typeset -A opt_args
 33+
 34+	_arguments -C \
 35+		':command:->command' \
 36+		'*::options:->options'
 37+
 38+	case $state in
 39+		(command)
 40+
 41+			local -a subcommands
 42+			subcommands=(
 43+				'init:Initialize a new git repo with support for the branching model.'
 44+				'feature:Manage your feature branches.'
 45+				'config:Manage your configuration.'
 46+				'release:Manage your release branches.'
 47+				'hotfix:Manage your hotfix branches.'
 48+				'support:Manage your support branches.'
 49+				'version:Shows version information.'
 50+			)
 51+			_describe -t commands 'git flow' subcommands
 52+		;;
 53+
 54+		(options)
 55+			case $line[1] in
 56+
 57+				(init)
 58+					_arguments \
 59+						-f'[Force setting of gitflow branches, even if already configured]'
 60+					;;
 61+
 62+					(version)
 63+					;;
 64+
 65+					(hotfix)
 66+						__git-flow-hotfix
 67+					;;
 68+
 69+					(release)
 70+						__git-flow-release
 71+					;;
 72+
 73+					(feature)
 74+						__git-flow-feature
 75+					;;
 76+					(config)
 77+					__git-flow-config
 78+					;;
 79+
 80+			esac
 81+		;;
 82+	esac
 83+}
 84+
 85+__git-flow-release ()
 86+{
 87+	local curcontext="$curcontext" state line
 88+	typeset -A opt_args
 89+
 90+	_arguments -C \
 91+		':command:->command' \
 92+		'*::options:->options'
 93+
 94+	case $state in
 95+		(command)
 96+
 97+			local -a subcommands
 98+			subcommands=(
 99+				'start:Start a new release branch.'
100+				'finish:Finish a release branch.'
101+				'list:List all your release branches. (Alias to `git flow release`)'
102+				'publish:Publish release branch to remote.'
103+				'track:Checkout remote release branch.'
104+				'delet:Delete a release branch.'
105+			)