@@ -80,22 +80,10 @@ __gitex_specific_branch_names() {
8080 _wanted branch-names expl branch-name compadd - $branch_names
8181}
8282
83- __gitex_chore_branch_names () {
84- __gitex_specific_branch_names ' chore'
85- }
86-
8783__gitex_feature_branch_names () {
8884 __gitex_specific_branch_names ' feature'
8985}
9086
91- __gitex_refactor_branch_names () {
92- __gitex_specific_branch_names ' refactor'
93- }
94-
95- __gitex_bug_branch_names () {
96- __gitex_specific_branch_names ' bug'
97- }
98-
9987__gitex_submodule_names () {
10088 local expl
10189 declare -a submodule_names
@@ -120,84 +108,11 @@ _git-authors() {
120108 ' --no-email[without email]' \
121109}
122110
123- _git-bug () {
124- local curcontext=$curcontext state line ret=1
125- declare -A opt_args
126-
127- _arguments -C \
128- ' : :->command' \
129- ' *:: :->option-or-argument' && ret=0
130-
131- case $state in
132- (command)
133- declare -a commands
134- commands=(
135- ' finish:merge bug into the current branch'
136- )
137- _describe -t commands command commands && ret=0
138- ;;
139- (option-or-argument)
140- curcontext=${curcontext%:* } -$line [1]:
141- case $line [1] in
142- (finish)
143- _arguments -C \
144- ' --squash[Use squash merge]' \
145- ' :branch-name:__gitex_bug_branch_names'
146- ;;
147- -r|--remote )
148- _arguments -C \
149- ' :remote-name:__gitex_remote_names'
150- ;;
151- esac
152- return 0
153- esac
154-
155- _arguments \
156- ' (--remote -r)' {--remote,-r}' [setup remote tracking branch]'
157- }
158-
159-
160111_git-changelog () {
161112 _arguments \
162113 ' (-l --list)' {-l,--list}' [list commits]' \
163114}
164115
165- _git-chore () {
166- local curcontext=$curcontext state line ret=1
167- declare -A opt_args
168-
169- _arguments -C \
170- ' : :->command' \
171- ' *:: :->option-or-argument' && ret=0
172-
173- case $state in
174- (command)
175- declare -a commands
176- commands=(
177- ' finish:merge and delete the chore branch'
178- )
179- _describe -t commands command commands && ret=0
180- ;;
181- (option-or-argument)
182- curcontext=${curcontext%:* } -$line [1]:
183- case $line [1] in
184- (finish)
185- _arguments -C \
186- ' --squash[Use squash merge]' \
187- ' :branch-name:__gitex_chore_branch_names'
188- ;;
189- -r|--remote )
190- _arguments -C \
191- ' :remote-name:__gitex_remote_names'
192- ;;
193- esac
194- return 0
195- esac
196-
197- _arguments \
198- ' (--remote -r)' {--remote,-r}' [setup remote tracking branch]'
199- }
200-
201116_git-coauthor () {
202117 _arguments \
203118 ' :co-author[co-author to add]' \
@@ -365,44 +280,6 @@ _git-missing() {
365280 ' :second-branch-name:__gitex_branch_names'
366281}
367282
368-
369- _git-refactor () {
370- local curcontext=$curcontext state line ret=1
371- declare -A opt_args
372-
373- _arguments -C \
374- ' : :->command' \
375- ' *:: :->option-or-argument' && ret=0
376-
377- case $state in
378- (command)
379- declare -a commands
380- commands=(
381- ' finish:merge refactor into the current branch'
382- )
383- _describe -t commands command commands && ret=0
384- ;;
385- (option-or-argument)
386- curcontext=${curcontext%:* } -$line [1]:
387- case $line [1] in
388- (finish)
389- _arguments -C \
390- ' --squash[Use squash merge]' \
391- ' :branch-name:__gitex_refactor_branch_names'
392- ;;
393- -r|--remote )
394- _arguments -C \
395- ' :remote-name:__gitex_remote_names'
396- ;;
397- esac
398- return 0
399- esac
400-
401- _arguments \
402- ' (--remote -r)' {--remote,-r}' [setup remote tracking branch]'
403- }
404-
405-
406283_git-squash () {
407284 _arguments ' --squash-msg[commit with the squashed commit messages]'
408285 _arguments \
0 commit comments