These should be pretty obvious and straightforward. Changes since v1: * Removed test for suffix in variable names Felipe Contreras (4): completion: bash: fix prefix detection in branch.* completion: bash: fix for suboptions with value completion: bash: fix for multiple dash commands completion: bash: add correct suffix in variables contrib/completion/git-completion.bash | 14 +++++++------- t/t9902-completion.sh | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) Range-diff: 1: 26bbb19677 = 1: dd49b0e680 completion: bash: fix prefix detection in branch.* 3: aad0bc6a0f = 2: 6ac184b9a4 completion: bash: fix for suboptions with value 4: 77a4b0b0d0 = 3: 960a692fda completion: bash: fix for multiple dash commands 2: 4bcc8a5fca ! 4: a95c3edaf9 completion: bash: add correct suffix in variables @@ Commit message git config branch.autoSetupMe<tab> + This fix only works for versions of bash greater than 4.0, before that + "local sfx" creates an empty string, therefore the unset expansion + doesn't work. The same happens in zsh. + + Therefore we don't add the test for that for now. + + The correct fix for all shells requires semantic changes in __gitcomp, + but that can be done later. + + Cc: SZEDER Gábor <szeder.dev@xxxxxxxxx> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx> ## contrib/completion/git-completion.bash ## @@ contrib/completion/git-completion.bash: __git_complete_config_variable_name () return ;; url.*.*) - - ## t/t9902-completion.sh ## -@@ t/t9902-completion.sh: test_expect_success 'git config - value' ' - EOF - ' - -+test_expect_success 'git config - direct completions' ' -+ test_completion "git config branch.autoSetup" <<-\EOF -+ branch.autoSetupMerge Z -+ branch.autoSetupRebase Z -+ EOF -+' -+ - test_expect_success 'git -c - section' ' - test_completion "git -c br" <<-\EOF - branch.Z -- 2.30.0.rc1