<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion/git-completion.bash, branch v2.3.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-03-28T16:33:15Z</updated>
<entry>
<title>Merge branch 'sg/completion-gitcomp-nl-for-refs' into maint</title>
<updated>2015-03-28T16:33:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-28T16:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4eea8e3fa0c41137d7126a0ff262eb7a85991b90'/>
<id>urn:sha1:4eea8e3fa0c41137d7126a0ff262eb7a85991b90</id>
<content type='text'>
Code clean-up.

* sg/completion-gitcomp-nl-for-refs:
  completion: use __gitcomp_nl() for completing refs
</content>
</entry>
<entry>
<title>Merge branch 'js/completion-ctags-pattern-substitution-fix' into maint</title>
<updated>2015-03-27T20:00:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-27T20:00:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=792c57273f5ccc318c93d32112548fbd033f5964'/>
<id>urn:sha1:792c57273f5ccc318c93d32112548fbd033f5964</id>
<content type='text'>
The code that reads from the ctags file in the completion script
(in contrib/) did not spell ${param/pattern/string} substitution
correctly, which happened to work with bash but not with zsh.

* js/completion-ctags-pattern-substitution-fix:
  contrib/completion: escape the forward slash in __git_match_ctag
</content>
</entry>
<entry>
<title>Merge branch 'sg/completion-remote' into maint</title>
<updated>2015-03-23T18:23:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-23T18:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d6f6e373007553d747b4f0f5083d66fdd0c17c5'/>
<id>urn:sha1:7d6f6e373007553d747b4f0f5083d66fdd0c17c5</id>
<content type='text'>
Code simplification.

* sg/completion-remote:
  completion: simplify __git_remotes()
  completion: add a test for __git_remotes() helper function
</content>
</entry>
<entry>
<title>completion: use __gitcomp_nl() for completing refs</title>
<updated>2015-03-22T23:41:12Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder@ira.uka.de</email>
</author>
<published>2015-03-22T12:03:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=260d5850ad452adb7ac0ab70d0a5d0211bdd967f'/>
<id>urn:sha1:260d5850ad452adb7ac0ab70d0a5d0211bdd967f</id>
<content type='text'>
We do that almost everywhere, because it's faster for large number of
refs, see a31e62629 (completion: optimize refs completion, 2011-10-15).
These were the last two places where we still used __gitcomp() for
completing refs.

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>contrib/completion: escape the forward slash in __git_match_ctag</title>
<updated>2015-03-15T01:59:09Z</updated>
<author>
<name>John Szakmeister</name>
<email>john@szakmeister.net</email>
</author>
<published>2015-03-14T13:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db8d750876ce9c43b23ddfdbe618ec5dd12767ee'/>
<id>urn:sha1:db8d750876ce9c43b23ddfdbe618ec5dd12767ee</id>
<content type='text'>
The current definition results in an incorrect expansion of the term under zsh.
For instance "/^${1////\\/}/" under zsh with the argument "hi" results in:
    /^/\/h/\/i/

This results in an output similar to this when trying to complete `git grep
chartab` under zsh:

    :: git grep chartabawk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 }
    awk: cmd. line:1:    ^ backslash not last character on line
    awk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 }
    awk: cmd. line:1:    ^ syntax error

Leaving the prompt in a goofy state until the user hits a key.

Escaping the literal / in the parameter expansion (using "/^${1//\//\\/}/")
results in:
    /^chartab/

allowing the completion to work correctly.

This formulation also works under bash.

Signed-off-by: John Szakmeister &lt;john@szakmeister.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config,completion: add color.status.unmerged</title>
<updated>2015-03-10T22:27:59Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2015-03-10T16:11:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0d6accc01d4073d685ece5ba9fd0a439539a5a02'/>
<id>urn:sha1:0d6accc01d4073d685ece5ba9fd0a439539a5a02</id>
<content type='text'>
Reported-by: "Mladen B." &lt;mladen074@gmail.com&gt;
Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: simplify __git_remotes()</title>
<updated>2015-03-06T20:48:02Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder@ira.uka.de</email>
</author>
<published>2015-03-04T14:10:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=53e53c7c81ce2c7c4cd45f95bc095b274cb28b76'/>
<id>urn:sha1:53e53c7c81ce2c7c4cd45f95bc095b274cb28b76</id>
<content type='text'>
The __git_remotes() helper function lists the remotes from the config
file by processing the output of a 'git config' query.  A simple 'git
remote' produces the exact same output, so run that instead.

Remotes under '$GIT_DIR/remotes' are still listed by running 'ls -1',
because 'git remote' unfortunately ignores them.

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mm/complete-rebase-autostash'</title>
<updated>2015-01-14T20:33:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T20:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e7ef5d9bf49a7de85e9a4d25f1a44ed955c40fc'/>
<id>urn:sha1:1e7ef5d9bf49a7de85e9a4d25f1a44ed955c40fc</id>
<content type='text'>
* mm/complete-rebase-autostash:
  git-completion: add --autostash for 'git rebase'
</content>
</entry>
<entry>
<title>Merge branch 'pd/completion-filenames-fix'</title>
<updated>2015-01-07T21:06:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-07T21:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e82f629cf40795e7780329f056fc3df2d6adc97b'/>
<id>urn:sha1:e82f629cf40795e7780329f056fc3df2d6adc97b</id>
<content type='text'>
The top-of-the-file instruction for completion scripts (in contrib/)
did not name the files correctly.

* pd/completion-filenames-fix:
  Update documentation occurrences of filename .sh
</content>
</entry>
<entry>
<title>git-completion: add --autostash for 'git rebase'</title>
<updated>2015-01-07T18:42:53Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2015-01-07T12:40:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d89ad9c1b8878c54dd46725bd3c01e53b46f748a'/>
<id>urn:sha1:d89ad9c1b8878c54dd46725bd3c01e53b46f748a</id>
<content type='text'>
This option was added in 58794775 (rebase: implement
--[no-]autostash and rebase.autostash, 2013-05-12).

Completion of "--autosquash" has been there, but this was not;
addition of this would require people completing "--autosquash" to
type a bit more than before.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
