<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion/git-completion.zsh, branch v2.34.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.34.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.34.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-06-02T03:49:40Z</updated>
<entry>
<title>contrib/completion: fix zsh completion regression from 59d85a2a05</title>
<updated>2021-06-02T03:49:40Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2021-06-01T20:52:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b18023d000ed8c0851a025fcd4fd518cb2df673'/>
<id>urn:sha1:0b18023d000ed8c0851a025fcd4fd518cb2df673</id>
<content type='text'>
A recent change to make git-completion.bash use $__git_cmd_idx
in more places broke a number of completions on zsh because it
modified __git_main but did not update __git_zsh_main.

Notably, completions for "add", "branch", "mv" and "push" were
broken as a result of this change.

In addition to the undefined variable usage, "git mv &lt;tab&gt;" also
prints the following error:

	__git_count_arguments:7: bad math expression:
	operand expected at `"1"'

	_git_mv:[:7: unknown condition: -gt

Remove the quotes around $__git_cmd_idx in __git_count_arguments
and set __git_cmd_idx=1 early in __git_zsh_main to fix the
regressions from 59d85a2a05.

This was tested on zsh 5.7.1 (x86_64-apple-darwin19.0).

Suggested-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: David Aguilar &lt;davvid@gmail.com&gt;
Acked-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: zsh: fix file completion regression</title>
<updated>2020-12-01T18:32:40Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-12-01T00:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e'/>
<id>urn:sha1:c5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e</id>
<content type='text'>
Turns out we always need to set the ignored prefix (compset) to have
similar behavior as in default Bash.

The issue can be seen with:

  git show master:&lt;tab&gt;

Commit 94b2901cfe wrongly removed it.

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>zsh: update copyright notices</title>
<updated>2020-10-28T21:31:19Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=af806a2c2417d21dc024bf013ec511765441e286'/>
<id>urn:sha1:af806a2c2417d21dc024bf013ec511765441e286</id>
<content type='text'>
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: zsh: add simple version check</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=35a4170d8656b27d08458c3c381dd163199da4f3'/>
<id>urn:sha1:35a4170d8656b27d08458c3c381dd163199da4f3</id>
<content type='text'>
A lot of people are confused about which completion script they are
using; Zsh's Git script, or Git's Zsh script.

Add a simple helper so they can type 'git zsh&lt;tab&gt;' and find out if they
are running the correct one: this.

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: zsh: trivial simplification</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bbd7f45884ca379e3cd28bb5fb8e804bcfb3360c'/>
<id>urn:sha1:bbd7f45884ca379e3cd28bb5fb8e804bcfb3360c</id>
<content type='text'>
&gt;From upstream bash simplification:

  d9ee1e0617 (completion: simplify inner 'case' pattern in __gitcomp())

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: zsh: add alias descriptions</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2769e567d140a51e4e6e426fe776005ae889e9b0'/>
<id>urn:sha1:2769e567d140a51e4e6e426fe776005ae889e9b0</id>
<content type='text'>
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: zsh: improve command tags</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9d760527addc576c87e9b0e66b63376e580b434a'/>
<id>urn:sha1:9d760527addc576c87e9b0e66b63376e580b434a</id>
<content type='text'>
There's no need to use _alternative and repeat a lot of the code.

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: zsh: refactor command completion</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a397ea5ad59e64ff6eebfd1d7dad43aac790e0a'/>
<id>urn:sha1:9a397ea5ad59e64ff6eebfd1d7dad43aac790e0a</id>
<content type='text'>
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: zsh: shuffle functions around</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46af9b371929c3c3c9cc0f5b4aa9bcb3089e6405'/>
<id>urn:sha1:46af9b371929c3c3c9cc0f5b4aa9bcb3089e6405</id>
<content type='text'>
Just to have a nice order.

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: zsh: simplify file_direct</title>
<updated>2020-10-28T21:30:59Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2020-10-28T02:07:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5d64fb20511270ffb2d939210a5afe66419f69ab'/>
<id>urn:sha1:5d64fb20511270ffb2d939210a5afe66419f69ab</id>
<content type='text'>
It's exactly the same as __gitcomp_file() with no prefix.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
