git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/4] completion: bash: a bunch of fixes

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Dec 23, 2020, 14:48 UTC
Message-ID
<20201223144845.143039-1-felipe.contreras@gmail.com>
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@gmail.com>
         Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
     
      ## 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
Next: Felipe Contreras
Message 1 of 5 in “completion: bash: a bunch of fixes”
  1. 0/4 completion: bash: a bunch of fixesFelipe Contreras, Dec 23, 2020
  2. 1/4 completion: bash: fix prefix detection in branch.*Felipe Contreras, Dec 23, 2020
  3. 3/4 completion: bash: fix for multiple dash commandsFelipe Contreras, Dec 23, 2020
  4. 4/4 completion: bash: add correct suffix in variablesFelipe Contreras, Dec 23, 2020
  5. 2/4 completion: bash: fix for suboptions with valueFelipe Contreras, Dec 23, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.