Skip to content

Commit 2c0f3a5

Browse files
Cornelius Weiggitster
authored andcommitted
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>
1 parent bd9ab9d commit 2c0f3a5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

contrib/completion/git-completion.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,12 @@ _git_ls_files ()
14491449

14501450
_git_ls_remote ()
14511451
{
1452+
case "$cur" in
1453+
--*)
1454+
__gitcomp "--heads --tags --refs --get-url --symref"
1455+
return
1456+
;;
1457+
esac
14521458
__gitcomp_nl "$(__git_remotes)"
14531459
}
14541460

0 commit comments

Comments
 (0)