diff options
author | Cornelius Weig <cornelius.weig@tngtech.com> | 2017-02-03 12:01:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-02-03 22:25:46 -0800 |
commit | 2c0f3a5314cf73ba99bdeb8a64734eba10985689 (patch) | |
tree | 2b8f333fda3648f3268ad40e74eff6f6a46d86f8 /contrib | |
parent | bd9ab9dfc0b64128b10567906032c7f6e1d9bd67 (diff) | |
download | git-2c0f3a5314cf73ba99bdeb8a64734eba10985689.tar.gz git-2c0f3a5314cf73ba99bdeb8a64734eba10985689.tar.xz |
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>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/completion/git-completion.bash | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bfa3afb4c..2ed0ef629 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)" } |