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