summaryrefslogtreecommitdiff
path: root/t/t6300-for-each-ref.sh
diff options
context:
space:
mode:
authorLibravatar SZEDER Gábor <szeder.dev@gmail.com>2019-08-13 14:26:49 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-08-13 12:31:04 -0700
commite1e00089da9f616d23f0ca3bb183258e9013c469 (patch)
treeed1def6fbc51c67133cae7683e10b2eb9ce69c6f /t/t6300-for-each-ref.sh
parentcompletion: split _git_config() (diff)
downloadtgif-e1e00089da9f616d23f0ca3bb183258e9013c469.tar.xz
completion: complete configuration sections and variable names for 'git -c'
'git config' expects a configuration variable's name and value in separate arguments, so we let the __gitcomp() helper append a space character to each variable name by default, like we do for most other things (--options, refs, paths, etc.). 'git -c', however, expects them in a single option joined by a '=' character, i.e. 'section.name=value', so we should append a '=' character to each fully completed variable name, but no space, so the user can continue typing the value right away. Add an option to the __git_complete_config_variable_name() function to allow callers to specify an alternate suffix to add, and use it to append that '=' character to configuration variables. Update the __gitcomp() helper function to not append a trailing space to any completion words ending with a '=', not just to those option with a stuck argument. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6300-for-each-ref.sh')
0 files changed, 0 insertions, 0 deletions