git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: cornelius.weig@tngtech.com
To: j6t@kdbg.org
Cc: szeder.dev@gmail.com, spearce@spearce.org, git@vger.kernel.org,
	Cornelius Weig <cornelius.weig@tngtech.com>
Subject: [PATCH v2 7/7] completion: recognize more long-options
Date: Fri, 27 Jan 2017 22:17:03 +0100	[thread overview]
Message-ID: <20170127211703.24910-2-cornelius.weig@tngtech.com> (raw)
In-Reply-To: <20170127211703.24910-1-cornelius.weig@tngtech.com>

From: Cornelius Weig <cornelius.weig@tngtech.com>

Recognize several new long-options for bash completion in the following
commands:

 - 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=
 - rm: --force
 - shortlog: --email
 - tag: --merged --no-merged --create-reflog

Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
Helped-by: Johannes Sixt <j6t@kdbg.org>
---
 contrib/completion/git-completion.bash | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0e09519..933bb6e 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -936,6 +936,7 @@ _git_apply ()
 			--apply --no-add --exclude=
 			--ignore-whitespace --ignore-space-change
 			--whitespace= --inaccurate-eof --verbose
+			--recount --directory=
 			"
 		return
 	esac
@@ -974,7 +975,7 @@ _git_archive ()
 	--*)
 		__gitcomp "
 			--format= --list --verbose
-			--prefix= --remote= --exec=
+			--prefix= --remote= --exec= --output
 			"
 		return
 		;;
@@ -1029,6 +1030,7 @@ _git_branch ()
 			--track --no-track --contains --merged --no-merged
 			--set-upstream-to= --edit-description --list
 			--unset-upstream --delete --move --remotes
+			--column --no-column --sort= --points-at
 			"
 		;;
 	*)
@@ -1142,6 +1144,8 @@ _git_clone ()
 			--single-branch
 			--branch
 			--recurse-submodules
+			--no-single-branch
+			--shallow-submodules
 			"
 		return
 		;;
@@ -1183,6 +1187,7 @@ _git_commit ()
 			--reset-author --file= --message= --template=
 			--cleanup= --untracked-files --untracked-files=
 			--verbose --quiet --fixup= --squash=
+			--patch --short --date --allow-empty
 			"
 		return
 	esac
@@ -1201,7 +1206,7 @@ _git_describe ()
 	--*)
 		__gitcomp "
 			--all --tags --contains --abbrev= --candidates=
-			--exact-match --debug --long --match --always
+			--exact-match --debug --long --match --always --first-parent
 			"
 		return
 	esac
@@ -1284,6 +1289,7 @@ __git_fetch_recurse_submodules="yes on-demand no"
 __git_fetch_options="
 	--quiet --verbose --append --upload-pack --force --keep --depth=
 	--tags --no-tags --all --prune --dry-run --recurse-submodules=
+	--unshallow --update-shallow
 "
 
 _git_fetch ()
@@ -1333,7 +1339,7 @@ _git_fsck ()
 	--*)
 		__gitcomp "
 			--tags --root --unreachable --cache --no-reflogs --full
-			--strict --verbose --lost-found
+			--strict --verbose --lost-found --name-objects
 			"
 		return
 		;;
@@ -1377,6 +1383,8 @@ _git_grep ()
 			--max-depth
 			--count
 			--and --or --not --all-match
+			--break --heading --show-function --function-context
+			--untracked --no-index
 			"
 		return
 		;;
@@ -1576,7 +1584,7 @@ _git_mergetool ()
 		return
 		;;
 	--*)
-		__gitcomp "--tool="
+		__gitcomp "--tool= --prompt --no-prompt"
 		return
 		;;
 	esac
@@ -2456,7 +2464,7 @@ _git_reset ()
 
 	case "$cur" in
 	--*)
-		__gitcomp "--merge --mixed --hard --soft --patch"
+		__gitcomp "--merge --mixed --hard --soft --patch --keep"
 		return
 		;;
 	esac
@@ -2472,7 +2480,10 @@ _git_revert ()
 	fi
 	case "$cur" in
 	--*)
-		__gitcomp "--edit --mainline --no-edit --no-commit --signoff"
+		__gitcomp "
+			--edit --mainline --no-edit --no-commit --signoff
+			--strategy= --strategy-option=
+			"
 		return
 		;;
 	esac
@@ -2483,7 +2494,7 @@ _git_rm ()
 {
 	case "$cur" in
 	--*)
-		__gitcomp "--cached --dry-run --ignore-unmatch --quiet"
+		__gitcomp "--cached --dry-run --ignore-unmatch --quiet --force"
 		return
 		;;
 	esac
@@ -2500,7 +2511,7 @@ _git_shortlog ()
 		__gitcomp "
 			$__git_log_common_options
 			$__git_log_shortlog_options
-			--numbered --summary
+			--numbered --summary --email
 			"
 		return
 		;;
@@ -2778,8 +2789,8 @@ _git_tag ()
 	--*)
 		__gitcomp "
 			--list --delete --verify --annotate --message --file
-			--sign --cleanup --local-user --force --column --sort
-			--contains --points-at
+			--sign --cleanup --local-user --force --column --sort=
+			--contains --points-at --merged --no-merged --create-reflog
 			"
 		;;
 	esac
-- 
2.10.2


  reply	other threads:[~2017-01-27 21:20 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-22 22:57 [PATCH 0/7] completion bash: add more options and commands bitte.keine.werbung.einwerfen
2017-01-22 22:57 ` [PATCH 1/7] completion: teach options to submodule subcommands bitte.keine.werbung.einwerfen
2017-01-22 22:57 ` [PATCH 2/7] completion: add subcommand completion for rerere bitte.keine.werbung.einwerfen
2017-02-02  0:57   ` SZEDER Gábor
2017-02-02  9:16     ` Cornelius Weig
2017-01-22 22:57 ` [PATCH 3/7] completion: improve bash completion for git-add bitte.keine.werbung.einwerfen
2017-01-22 22:57 ` [PATCH 4/7] completion: teach ls-remote to complete options bitte.keine.werbung.einwerfen
2017-02-02  1:40   ` SZEDER Gábor
2017-02-02  9:40     ` Cornelius Weig
2017-02-02 16:57       ` Junio C Hamano
2017-01-22 22:57 ` [PATCH 5/7] completion: teach replace " bitte.keine.werbung.einwerfen
2017-01-22 22:57 ` [PATCH 6/7] completion: teach remote subcommands option completion bitte.keine.werbung.einwerfen
2017-02-02  1:37   ` SZEDER Gábor
2017-02-02 10:29     ` Cornelius Weig
2017-01-22 22:57 ` [PATCH 7/7] completion: recognize more long-options bitte.keine.werbung.einwerfen
2017-01-24  7:15   ` Johannes Sixt
2017-01-24  8:14     ` Cornelius Weig
2017-01-24 23:24       ` Junio C Hamano
2017-01-24 23:33         ` Cornelius Weig
2017-01-24 23:43           ` Stefan Beller
2017-01-25  0:11             ` Cornelius Weig
2017-01-25  0:21               ` Stefan Beller
2017-01-25  0:43                 ` Cornelius Weig
2017-01-25  0:52                   ` Re: Stefan Beller
2017-01-25  0:54                 ` Re: Linus Torvalds
2017-01-25  1:32                   ` Re: Eric Wong
2017-01-25  6:54                 ` SubmittingPatches: drop temporal reference for PGP signing Philip Oakley
2017-01-25 22:38                   ` Stefan Beller
2017-01-26 13:30                     ` Cornelius Weig
2017-01-26 17:57                       ` Stefan Beller
2017-01-26 18:18                       ` Junio C Hamano
2017-01-26 20:58                         ` Philip Oakley
2017-01-27 10:49                           ` Cornelius Weig
2017-01-27 17:43                             ` Junio C Hamano
2017-01-27 21:17     ` [PATCH v2 0/7] completion: recognize more long-options cornelius.weig
2017-01-27 21:17       ` cornelius.weig [this message]
2017-01-31 22:17         ` [PATCH v2 7/7] " SZEDER Gábor
2017-02-01 16:49           ` Cornelius Weig
2017-02-02  2:00             ` SZEDER Gábor
2017-02-02 10:40               ` Cornelius Weig
2017-01-31 22:42 ` [PATCH 3/7] completion: improve bash completion for git-add SZEDER Gábor
  -- strict thread matches above, loose matches on Subject: below --
2017-02-03 11:01 [PATCH v2 0/7] completion bash: add more options and commands cornelius.weig
2017-02-03 11:01 ` [PATCH v2 7/7] completion: recognize more long-options cornelius.weig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170127211703.24910-2-cornelius.weig@tngtech.com \
    --to=cornelius.weig@tngtech.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=spearce@spearce.org \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).