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 <cornelius.weig@tngtech.com>
Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Cornelius Weig 2017-02-03 12:01:56 +01:00 committed by Junio C Hamano
parent bd9ab9dfc0
commit 2c0f3a5314

View File

@ -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)"
}