[PATCH v2 5/7] completion: teach replace to complete options
- From
- cornelius.weig@tngtech.com <cornelius.weig@tngtech.com>
- Date
- Feb 3, 2017, 11:01 UTC
- Message-ID
- <20170203110159.377-6-cornelius.weig@tngtech.com>
- In-Reply-To
- <20170203110159.377-1-cornelius.weig@tngtech.com>
From: Cornelius Weig <cornelius.weig@tngtech.com>
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> --- 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 a355eeb..4841036 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)" }
-- 2.10.2