summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCornelius Weig <cornelius.weig@tngtech.com>2017-02-03 11:01:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-04 06:25:46 (GMT)
commit188fba1172964da1d0169535e859381c3f2b1191 (patch)
tree0dc00ba59d31a7992a0ddfb82ab616be85cfd87c /contrib
parent2c0f3a5314cf73ba99bdeb8a64734eba10985689 (diff)
downloadgit-188fba1172964da1d0169535e859381c3f2b1191.zip
git-188fba1172964da1d0169535e859381c3f2b1191.tar.gz
git-188fba1172964da1d0169535e859381c3f2b1191.tar.bz2
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>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 2ed0ef6..8c6736e 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2408,6 +2408,12 @@ _git_remote ()
_git_replace ()
{
+ case "$cur" in
+ --*)
+ __gitcomp "--edit --graft --format= --list --delete"
+ return
+ ;;
+ esac
__gitcomp_nl "$(__git_refs)"
}