git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] bash completion: difftool accepts the same options as diff
@ 2009-10-28  9:45 Markus Heidelberg
  2009-10-28 14:32 ` Shawn O. Pearce
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Heidelberg @ 2009-10-28  9:45 UTC (permalink / raw
  To: Shawn O. Pearce; +Cc: Junio C Hamano, git, David Aguilar, Markus Heidelberg

So complete refs, files after the doubledash and some diff options that
make sense for difftool.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
 contrib/completion/git-completion.bash |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index d3fec32..45369e2 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -958,6 +958,8 @@ __git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
 
 _git_difftool ()
 {
+	__git_has_doubledash && return
+
 	local cur="${COMP_WORDS[COMP_CWORD]}"
 	case "$cur" in
 	--tool=*)
@@ -965,11 +967,15 @@ _git_difftool ()
 		return
 		;;
 	--*)
-		__gitcomp "--tool="
+		__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
+			--base --ours --theirs
+			--no-renames --diff-filter= --find-copies-harder
+			--relative --ignore-submodules
+			--tool="
 		return
 		;;
 	esac
-	COMPREPLY=()
+	__git_complete_file
 }
 
 __git_fetch_options="
-- 
1.6.5.2.86.g61663

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bash completion: difftool accepts the same options as diff
  2009-10-28  9:45 [PATCH] bash completion: difftool accepts the same options as diff Markus Heidelberg
@ 2009-10-28 14:32 ` Shawn O. Pearce
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2009-10-28 14:32 UTC (permalink / raw
  To: Markus Heidelberg; +Cc: Junio C Hamano, git, David Aguilar

Markus Heidelberg <markus.heidelberg@web.de> wrote:
> So complete refs, files after the doubledash and some diff options that
> make sense for difftool.
> 
> Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>

Acked-by: Shawn O. Pearce <spearce@spearce.org>

>  contrib/completion/git-completion.bash |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)

-- 
Shawn.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-28 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-28  9:45 [PATCH] bash completion: difftool accepts the same options as diff Markus Heidelberg
2009-10-28 14:32 ` Shawn O. Pearce

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).