From 188fba1172964da1d0169535e859381c3f2b1191 Mon Sep 17 00:00:00 2001 From: Cornelius Weig Date: Fri, 3 Feb 2017 12:01:57 +0100 Subject: completion: teach replace to complete options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 2ed0ef629..8c6736e4c 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)" } -- cgit v1.2.1