From: SZEDER Gábor Date: Tue, 13 Aug 2019 12:26:50 +0000 (+0200) Subject: completion: complete values of configuration variables after 'git -c var=' X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/dd33472831756895a86153c651c18580a6dccbc8 completion: complete values of configuration variables after 'git -c var=' 'git config' expects a configuration variable's name and value in separate options, so we complete values as they stand on their own on the command line. 'git -c', however, expects them in a single option joined by a '=' character, so we should be able to complete values when they are following 'section.name=' in the same word. Add new options to the __git_complete_config_variable_value() function to allow callers to specify the current word to be completed and the configuration variable whose value is to be completed, and use these to complete possible values after 'git -c 'section.name='. Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 367b1c50f4..6f2bc60707 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2229,96 +2229,112 @@ __git_compute_config_vars () } # Completes possible values of various configuration variables. +# +# Usage: __git_complete_config_variable_value [