]> git.ipfire.org Git - thirdparty/git.git/commit - t/t9902-completion.sh
completion: add --option completion for most builtin commands
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 24 Mar 2018 20:35:22 +0000 (21:35 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 25 Mar 2018 16:34:34 +0000 (09:34 -0700)
commit9f642a71699dd10770dcf0e66d581b53ef244b14
treeba00051997219c5355aa216f575947aa41ddd9db
parent48e1c69ade27395dfe7eb2be8aadf5fc50576a21
completion: add --option completion for most builtin commands

Many builtin commands use parseopt which can expose the option list
via --git-completion-helper but do not have explicit support in
git-completion.bash. This patch detects those commands and uses
__gitcomp_builtin for option completion.

This does not pollute the command name completion though. "git <tab>"
will show you the same set as before. This only kicks in when you type
the correct command name.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
t/t9902-completion.sh