<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion, branch v2.33.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.33.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.33.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-10-12T20:51:24Z</updated>
<entry>
<title>Merge branch 'ti/tcsh-completion-regression-fix' into maint</title>
<updated>2021-10-12T20:51:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-12T20:51:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e408f1060bc677a7d6f17d349f05203ef4b76f3'/>
<id>urn:sha1:4e408f1060bc677a7d6f17d349f05203ef4b76f3</id>
<content type='text'>
Update to the command line completion (in contrib/) for tcsh.

* ti/tcsh-completion-regression-fix:
  completion: tcsh: Fix regression by drop of wrapper functions
</content>
</entry>
<entry>
<title>Merge branch 'fc/completion-updates' into maint</title>
<updated>2021-10-12T20:51:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-12T20:51:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5d1c7028d06670fb8b3e851aa19316a7e2d2a64'/>
<id>urn:sha1:c5d1c7028d06670fb8b3e851aa19316a7e2d2a64</id>
<content type='text'>
Command line completion updates.

* fc/completion-updates:
  completion: bash: add correct suffix in variables
  completion: bash: fix for multiple dash commands
  completion: bash: fix for suboptions with value
  completion: bash: fix prefix detection in branch.*
</content>
</entry>
<entry>
<title>completion: tcsh: Fix regression by drop of wrapper functions</title>
<updated>2021-08-18T20:58:27Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-08-18T13:27:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff7b83f5629c0c00910384a0f524d89d3a8bf804'/>
<id>urn:sha1:ff7b83f5629c0c00910384a0f524d89d3a8bf804</id>
<content type='text'>
The cleanup of old compat wrappers in bash completion caused a
regression on tcsh completion that still uses them.
Let's update the tcsh call site as well for addressing it.

Fixes: 441ecdab37fe ("completion: bash: remove old compat wrappers")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: add correct suffix in variables</title>
<updated>2021-08-18T18:17:26Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-08-16T09:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be6444d1ca96fdd702b383de860e243aa7e65619'/>
<id>urn:sha1:be6444d1ca96fdd702b383de860e243aa7e65619</id>
<content type='text'>
__gitcomp automatically adds a suffix, but __gitcomp_nl and others
don't, we need to specify a space by default.

Can be tested with:

  git config branch.autoSetupMe&lt;tab&gt;

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 &lt;szeder.dev@gmail.com&gt;
Tested-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: fix for multiple dash commands</title>
<updated>2021-08-18T18:17:25Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-08-16T09:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f3cc916acc2e0f92c05e07c82c83b370e7d31247'/>
<id>urn:sha1:f3cc916acc2e0f92c05e07c82c83b370e7d31247</id>
<content type='text'>
Otherwise options of commands like 'for-each-ref' are not completed.

Tested-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: fix for suboptions with value</title>
<updated>2021-08-18T18:17:25Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-08-16T09:10:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e9f2118ddfad4ae5e37adc7637acc9daf4ac8c9c'/>
<id>urn:sha1:e9f2118ddfad4ae5e37adc7637acc9daf4ac8c9c</id>
<content type='text'>
We need to ignore options that don't start with -- as well.

Depending on the value of COMP_WORDBREAKS the last word could be
duplicated otherwise.

Can be tested with:

  git merge -X diff-algorithm=&lt;tab&gt;

Tested-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: bash: fix prefix detection in branch.*</title>
<updated>2021-08-18T18:17:25Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-08-16T09:10:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf8ae49a8f7d8b6dd87bbea34e6566e8581ab231'/>
<id>urn:sha1:bf8ae49a8f7d8b6dd87bbea34e6566e8581ab231</id>
<content type='text'>
Otherwise we are completely ignoring the --cur argument.

The issue can be tested with:

  git clone --config=branch.&lt;tab&gt;

Reviewed-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Tested-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fw/complete-cmd-idx-fix'</title>
<updated>2021-07-08T20:15:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-08T20:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a38c4c02e536b772526ad236b9887e28dab1d1e1'/>
<id>urn:sha1:a38c4c02e536b772526ad236b9887e28dab1d1e1</id>
<content type='text'>
Recent update to completion script (in contrib/) broke those who
use the __git_complete helper to define completion to their custom
command.

* fw/complete-cmd-idx-fix:
  completion: bash: fix late declaration of __git_cmd_idx
</content>
</entry>
<entry>
<title>Merge branch 'tb/complete-diff-anchored'</title>
<updated>2021-07-08T20:14:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-08T20:14:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a7d26bb4b60103a60284733b230a8af242fa9ff'/>
<id>urn:sha1:3a7d26bb4b60103a60284733b230a8af242fa9ff</id>
<content type='text'>
The command line completion (in contrib/) learned that "git diff"
takes the "--anchored" option.

* tb/complete-diff-anchored:
  completion: add --anchored to diff's options
</content>
</entry>
<entry>
<title>completion: bash: fix late declaration of __git_cmd_idx</title>
<updated>2021-06-19T06:30:35Z</updated>
<author>
<name>Fabian Wermelinger</name>
<email>fabianw@mavt.ethz.ch</email>
</author>
<published>2021-06-18T14:02:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cea232194d4da32696df26f9b5ad00d5624621db'/>
<id>urn:sha1:cea232194d4da32696df26f9b5ad00d5624621db</id>
<content type='text'>
A recent update to contrib/completion/git-completion.bash causes bash to fail
auto complete custom commands that are wrapped with __git_func_wrap. Declaring
__git_cmd_idx=0 inside __git_func_wrap resolves the issue.

Signed-off-by: Fabian Wermelinger &lt;fabianw@mavt.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
