Skip to content

Commit 188fba1

Browse files
Cornelius Weiggitster
authored andcommitted
completion: teach replace to complete options
Git-replace needs to complete references and its own options. In addition to the existing references completions, do also complete the options --edit --graft --format= --list --delete. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 2c0f3a5 commit 188fba1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

contrib/completion/git-completion.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2408,6 +2408,12 @@ _git_remote ()
24082408

24092409
_git_replace ()
24102410
{
2411+
case "$cur" in
2412+
--*)
2413+
__gitcomp "--edit --graft --format= --list --delete"
2414+
return
2415+
;;
2416+
esac
24112417
__gitcomp_nl "$(__git_refs)"
24122418
}
24132419

0 commit comments

Comments
 (0)