<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/completion/git-completion.bash, branch v2.19.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.19.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.19.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-10-11T23:26:49Z</updated>
<entry>
<title>doc: move git-cherry to plumbing</title>
<updated>2018-10-11T23:26:49Z</updated>
<author>
<name>Daniels Umanovskis</name>
<email>daniels@umanovskis.se</email>
</author>
<published>2018-10-11T18:33:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61018fe9e005a54e18184481927519d64035220a'/>
<id>urn:sha1:61018fe9e005a54e18184481927519d64035220a</id>
<content type='text'>
Also remove git-cherry from Bash completion because plumbing
commands do not belong there.

Signed-off-by: Daniels Umanovskis &lt;daniels@umanovskis.se&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>range-diff: make --dual-color the default mode</title>
<updated>2018-08-13T17:44:52Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-08-13T11:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=275267937bdbb8611e8872d64adebe7587c6fa5a'/>
<id>urn:sha1:275267937bdbb8611e8872d64adebe7587c6fa5a</id>
<content type='text'>
After using this command extensively for the last two months, this
developer came to the conclusion that even if the dual color mode still
leaves a lot of room for confusion about what was actually changed, the
non-dual color mode is substantially worse in that regard.

Therefore, we really want to make the dual color mode the default.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: support `git range-diff`</title>
<updated>2018-08-13T17:44:51Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-08-13T11:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7190a67eab181ebfbf61f4c8afaa3a149f685853'/>
<id>urn:sha1:7190a67eab181ebfbf61f4c8afaa3a149f685853</id>
<content type='text'>
Tab completion of `git range-diff` is very convenient, especially
given that the revision arguments to specify the commit ranges to
compare are typically more complex than, say, what is normally passed
to `git log`.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/completion-negation'</title>
<updated>2018-06-28T19:53:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-28T19:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6da2d9595161441cbed1b1f579b8dd46970a8e20'/>
<id>urn:sha1:6da2d9595161441cbed1b1f579b8dd46970a8e20</id>
<content type='text'>
Continuing with the idea to programmatically enumerate various
pieces of data required for command line completion, the codebase
has been taught to enumerate options prefixed with "--no-" to
negate them.

* nd/completion-negation:
  completion: collapse extra --no-.. options
  completion: suppress some -no- options
  parse-options: option to let --git-completion-helper show negative form
</content>
</entry>
<entry>
<title>Merge branch 'ls/complete-remote-update-names'</title>
<updated>2018-06-25T20:22:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-25T20:22:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0209e80cf4468653e7730881b4c5bdb5fc7389a'/>
<id>urn:sha1:f0209e80cf4468653e7730881b4c5bdb5fc7389a</id>
<content type='text'>
"git remote update" can take both a single remote nickname and a
nickname for remote groups, and the completion script (in contrib/)
has been taught about it.

* ls/complete-remote-update-names:
  completion: complete remote names too
</content>
</entry>
<entry>
<title>Merge branch 'nd/complete-config-vars'</title>
<updated>2018-06-25T20:22:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-25T20:22:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ebaf0a56f3f5f823df4166bc8fd626b523f864dc'/>
<id>urn:sha1:ebaf0a56f3f5f823df4166bc8fd626b523f864dc</id>
<content type='text'>
Continuing with the idea to programatically enumerate various
pieces of data required for command line completion, teach the
codebase to report the list of configuration variables
subcommands care about to help complete them.

* nd/complete-config-vars:
  completion: complete general config vars in two steps
  log-tree: allow to customize 'grafted' color
  completion: support case-insensitive config vars
  completion: keep other config var completion in camelCase
  completion: drop the hard coded list of config vars
  am: move advice.amWorkDir parsing back to advice.c
  advice: keep config name in camelCase in advice_config[]
  fsck: produce camelCase config key names
  help: add --config to list all available config
  fsck: factor out msg_id_info[] lazy initialization code
  grep: keep all colors in an array
  Add and use generic name-&gt;id mapping code for color slot parsing
</content>
</entry>
<entry>
<title>Merge branch 'sg/completion-zsh-workaround'</title>
<updated>2018-06-13T19:50:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-13T19:50:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d605b0f38775066be0eaed33c52e0b716035498'/>
<id>urn:sha1:4d605b0f38775066be0eaed33c52e0b716035498</id>
<content type='text'>
Work around zsh segfaulting when loading git-completion.zsh

* sg/completion-zsh-workaround:
  completion: correct zsh detection when run from git-completion.zsh
</content>
</entry>
<entry>
<title>completion: correct zsh detection when run from git-completion.zsh</title>
<updated>2018-06-12T17:13:44Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-06-11T18:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61d48c66ea7ef8acc0dd1114e0f79f4250aead38'/>
<id>urn:sha1:61d48c66ea7ef8acc0dd1114e0f79f4250aead38</id>
<content type='text'>
v2.18.0-rc0~90^2 (completion: reduce overhead of clearing cached
--options, 2018-04-18) worked around a bug in bash's "set" builtin on
MacOS by using compgen instead.  It was careful to avoid breaking zsh
by guarding this workaround with

	if [[ -n ${ZSH_VERSION-}} ]]

Alas, this interacts poorly with git-completion.zsh's bash emulation:

	ZSH_VERSION='' . "$script"

Correct it by instead using a new GIT_SOURCING_ZSH_COMPLETION shell
variable to detect whether git-completion.bash is being sourced from
git-completion.zsh.  This way, the zsh variant is used both when run
from zsh directly and when run via git-completion.zsh.

Reproduction recipe:

 1. cd git/contrib/completion &amp;&amp; cp git-completion.zsh _git
 2. Put the following in a new ~/.zshrc file:

 	autoload -U compinit; compinit
	autoload -U bashcompinit; bashcompinit
	fpath=(~/src/git/contrib/completion $fpath)

 3. Open zsh and "git &lt;TAB&gt;".

With this patch:
Triggers nice git-completion.bash based tab completion

Without:
 contrib/completion/git-completion.bash:354: read-only variable: QISUFFIX
 zsh:12: command not found: ___main
 zsh:15: _default: function definition file not found
 _dispatch:70: bad math expression: operand expected at `/usr/bin/g...'
 Segmentation fault

Reported-by: Rick van Hattem &lt;wolph@wol.ph&gt;
Reported-by: Dave Borowitz &lt;dborowitz@google.com&gt;
Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>completion: collapse extra --no-.. options</title>
<updated>2018-06-11T17:38:10Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-06-06T09:41:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b221b5ab9b92f3def37184db6e052ec87d7635b4'/>
<id>urn:sha1:b221b5ab9b92f3def37184db6e052ec87d7635b4</id>
<content type='text'>
The commands that make use of --git-completion-helper feature could
now produce a lot of --no-xxx options that a command can take. This in
many case could nearly double the amount of completable options, using
more screen estate and also harder to search for the wanted option.

This patch attempts to mitigate that by collapsing extra --no-
options, the ones that are added by --git-completion-helper and not in
original struct option arrays. The "--no-..." option will be displayed
in this case to hint about more options, e.g.

    &gt; ~/w/git $ git clone --
    --bare                 --origin=
    --branch=              --progress
    --checkout             --quiet
    --config=              --recurse-submodules
    --depth=               --reference=
    --dissociate           --reference-if-able=
    --filter=              --separate-git-dir=
    --hardlinks            --shallow-exclude=
    --ipv4                 --shallow-since=
    --ipv6                 --shallow-submodules
    --jobs=                --shared
    --local                --single-branch
    --mirror               --tags
    --no-...               --template=
    --no-checkout          --upload-pack=
    --no-hardlinks         --verbose
    --no-tags

and when you complete it with --no-&lt;tab&gt;, all negative options will be
presented:

    &gt; ~/w/git $ git clone --no-
    --no-bare                 --no-quiet
    --no-branch               --no-recurse-submodules
    --no-checkout             --no-reference
    --no-config               --no-reference-if-able
    --no-depth                --no-separate-git-dir
    --no-dissociate           --no-shallow-exclude
    --no-filter               --no-shallow-since
    --no-hardlinks            --no-shallow-submodules
    --no-ipv4                 --no-shared
    --no-ipv6                 --no-single-branch
    --no-jobs                 --no-tags
    --no-local                --no-template
    --no-mirror               --no-upload-pack
    --no-origin               --no-verbose
    --no-progress

Corner case: to make sure that people will never accidentally complete
the fake option "--no-..." there must be one real --no- in the first
complete listing even if it's not from the original struct option.

PS. This could could be made simpler with ";&amp;" to fall through from
"--no-*" block and share the code but ";&amp;" is not available on bash-3
(i.e. Mac)

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/command-list'</title>
<updated>2018-06-01T06:06:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-01T06:06:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2289880f784326dc955f213072164539dcaf445e'/>
<id>urn:sha1:2289880f784326dc955f213072164539dcaf445e</id>
<content type='text'>
The list of commands with their various attributes were spread
across a few places in the build procedure, but it now is getting a
bit more consolidated to allow more automation.

* nd/command-list:
  completion: allow to customize the completable command list
  completion: add and use --list-cmds=alias
  completion: add and use --list-cmds=nohelpers
  Move declaration for alias.c to alias.h
  completion: reduce completable command list
  completion: let git provide the completable command list
  command-list.txt: documentation and guide line
  help: use command-list.txt for the source of guides
  help: add "-a --verbose" to list all commands with synopsis
  git: support --list-cmds=list-&lt;category&gt;
  completion: implement and use --list-cmds=main,others
  git --list-cmds: collect command list in a string_list
  git.c: convert --list-* to --list-cmds=*
  Remove common-cmds.h
  help: use command-list.h for common command list
  generate-cmds.sh: export all commands to command-list.h
  generate-cmds.sh: factor out synopsis extract code
</content>
</entry>
</feed>
