Skip to content

Commit 9eb112f

Browse files
committed
Add bash completion for new drop and revert commands
1 parent c9d52da commit 9eb112f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

git-imerge.bashcomplete

+28
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ __git_imerge_commands="\
1919
start
2020
merge
2121
rebase
22+
drop
23+
revert
2224
continue
2325
finish
2426
diagram
@@ -67,6 +69,13 @@ __git_imerge_merge_options="\
6769
--manual
6870
"
6971

72+
__git_imerge_drop_options="\
73+
--help
74+
--name
75+
--branch
76+
--manual
77+
"
78+
7079
__git_imerge_list_options="\
7180
--help
7281
"
@@ -99,6 +108,8 @@ __git_imerge_remove_options=$__git_imerge_autofill_options
99108

100109
__git_imerge_rebase_options=$__git_imerge_merge_options
101110

111+
__git_imerge_revert_options=$__git_imerge_drop_options
112+
102113
__git-imerge_start_completion() {
103114
case "$1_$cur" in
104115
--help_|--branch_|_--branch=|--name_|_--name=)
@@ -179,6 +190,23 @@ __git-imerge_rebase_completion() {
179190
__git-imerge_merge_completion $1
180191
}
181192

193+
__git-imerge_drop_completion() {
194+
case "$1_$cur" in
195+
--help_|--branch_|_--branch=|--name_|_--name=)
196+
return
197+
;;
198+
*-|*_-*?)
199+
__gitcomp "$__git_imerge_merge_options"
200+
return
201+
;;
202+
esac
203+
__gitcomp "$(__git_imerge_branches)"
204+
}
205+
206+
__git-imerge_revert_completion() {
207+
__git-imerge_drop_completion $1
208+
}
209+
182210
__git-imerge_list_completion() {
183211
case "$1" in
184212
--help)

0 commit comments

Comments
 (0)