summaryrefslogtreecommitdiff
path: root/plugins/git-flow/git-flow.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/git-flow/git-flow.plugin.zsh')
-rw-r--r--plugins/git-flow/git-flow.plugin.zsh29
1 files changed, 24 insertions, 5 deletions
diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh
index 71b343884..b9ea06844 100644
--- a/plugins/git-flow/git-flow.plugin.zsh
+++ b/plugins/git-flow/git-flow.plugin.zsh
@@ -20,6 +20,12 @@
# c. Or, use this file as a oh-my-zsh plugin.
#
+#Alias
+alias gf='git flow'
+alias gcd='git checkout develop'
+alias gch='git checkout hotfix'
+alias gcr='git checkout release'
+
_git-flow ()
{
local curcontext="$curcontext" state line
@@ -88,6 +94,8 @@ __git-flow-release ()
'start:Start a new release branch.'
'finish:Finish a release branch.'
'list:List all your release branches. (Alias to `git flow release`)'
+ 'publish: public'
+ 'track: track'
)
_describe -t commands 'git flow release' subcommands
_arguments \
@@ -115,6 +123,16 @@ __git-flow-release ()
':version:__git_flow_version_list'
;;
+ (publish)
+ _arguments \
+ ':version:__git_flow_version_list'\
+ ;;
+
+ (track)
+ _arguments \
+ ':version:__git_flow_version_list'\
+ ;;
+
*)
_arguments \
-v'[Verbose (more) output]'
@@ -195,7 +213,7 @@ __git-flow-feature ()
'start:Start a new feature branch.'
'finish:Finish a feature branch.'
'list:List all your feature branches. (Alias to `git flow feature`)'
- 'publish: public'
+ 'publish: publish'
'track: track'
'diff: diff'
'rebase: rebase'
@@ -221,6 +239,7 @@ __git-flow-feature ()
_arguments \
-F'[Fetch from origin before performing finish]' \
-r'[Rebase instead of merge]'\
+ -k'[Keep branch after performing finish]'\
':feature:__git_flow_feature_list'
;;
@@ -236,13 +255,13 @@ __git-flow-feature ()
(diff)
_arguments \
- ':branch:__git_branch_names'\
+ ':branch:__git_flow_feature_list'\
;;
(rebase)
_arguments \
-i'[Do an interactive rebase]' \
- ':branch:__git_branch_names'
+ ':branch:__git_flow_feature_list'
;;
(checkout)
@@ -253,7 +272,7 @@ __git-flow-feature ()
(pull)
_arguments \
':remote:__git_remotes'\
- ':branch:__git_branch_names'
+ ':branch:__git_flow_feature_list'
;;
*)
@@ -333,4 +352,4 @@ __git_command_successful () {
return 0
}
-zstyle ':completion:*:*:git:*' user-commands flow:'description for foo' \ No newline at end of file
+zstyle ':completion:*:*:git:*' user-commands flow:'description for foo'