]> git.ipfire.org Git - thirdparty/git.git/commit - contrib/completion/git-completion.bash
completion: recognize more long-options
authorCornelius Weig <cornelius.weig@tngtech.com>
Fri, 3 Feb 2017 11:01:59 +0000 (12:01 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 4 Feb 2017 06:25:46 +0000 (22:25 -0800)
commitf483a0aa2a4ca30f4fa76ea4aff621e59cdb882c
treec4ee34d078985600ed00a919bc0b2c2597857d79
parentcac84960ea5a3f97c52dae7bf05591237bc0303d
completion: recognize more long-options

Command completion only recognizes a subset of the available options for
the various git commands. The set of recognized options needs to balance
between having all useful options and to not clutter the terminal.

This commit adds all long-options that are mentioned in the man-page
synopsis of the respective git command. Possibly dangerous options are
not included in this set, to avoid accidental data loss. The added
options are:

 - apply: --recount --directory=
 - archive: --output
 - branch: --column --no-column --sort= --points-at
 - clone: --no-single-branch --shallow-submodules
 - commit: --patch --short --date --allow-empty
 - describe: --first-parent
 - fetch, pull: --unshallow --update-shallow
 - fsck: --name-objects
 - grep: --break --heading --show-function --function-context
         --untracked --no-index
 - mergetool: --prompt --no-prompt
 - reset: --keep
 - revert: --strategy= --strategy-option=
 - shortlog: --email
 - tag: --merged --no-merged --create-reflog

Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
Helped-by: Johannes Sixt <j6t@kdbg.org>
Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash