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>
Cornelius Weig committed
Feb 3, 2017 at 12:01 UTC
2c0f3a5314cf73ba99bdeb8a64734eba10985689
1 file changed
+6
contrib/completion/git-completion.bash
+6
@@ -1449,6 +1449,12 @@ _git_ls_files ()
1449
1450
_git_ls_remote ()
1451
{
1452
+ case "$cur" in
1453
+ --*)
1454
+ __gitcomp "--heads --tags --refs --get-url --symref"
1455
+ return
1456
+ ;;
1457
+ esac
1458
__gitcomp_nl "$(__git_remotes)"
1459
}
1460