From: Cornelius Weig Date: Fri, 3 Feb 2017 11:01:56 +0000 (+0100) Subject: completion: teach ls-remote to complete options X-Git-Tag: v2.12.0-rc2~17^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c0f3a5314cf73ba99bdeb8a64734eba10985689;p=thirdparty%2Fgit.git completion: teach ls-remote to complete options ls-remote needs to complete remote names and its own options. In addition to the existing remote name completions, do also complete the options --heads, --tags, --refs, --get-url, and --symref. Signed-off-by: Cornelius Weig Reviewed-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bfa3afb4c1..2ed0ef6297 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1449,6 +1449,12 @@ _git_ls_files () _git_ls_remote () { + case "$cur" in + --*) + __gitcomp "--heads --tags --refs --get-url --symref" + return + ;; + esac __gitcomp_nl "$(__git_remotes)" }