git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] completion: add diff --color-moved[-ws]
@ 2020-02-20 21:46 Kir Kolyshkin
  2020-02-20 23:30 ` Matheus Tavares Bernardino
  2020-02-21 20:15 ` [PATCH v2] " Kir Kolyshkin
  0 siblings, 2 replies; 8+ messages in thread
From: Kir Kolyshkin @ 2020-02-20 21:46 UTC (permalink / raw)
  To: git; +Cc: szeder.dev, matheus.bernardino, Kir Kolyshkin

These options are available since git v2.15, but somehow
eluded from the completion script.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 contrib/completion/git-completion.bash | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 1aac5a56c0..43cb6a312d 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1487,9 +1487,16 @@ __git_diff_algorithms="myers minimal patience histogram"
 
 __git_diff_submodule_formats="diff log short"
 
+__git_color_moved_opts="no default plain blocks zebra dimmed-zebra"
+
+__git_color_moved_ws_opts="no ignore-space-at-eol ignore-all-space
+			allow-indentation-change"
+
 __git_diff_common_options="--stat --numstat --shortstat --summary
 			--patch-with-stat --name-only --name-status --color
 			--no-color --color-words --no-renames --check
+			--color-moved --color-moved= --no-color-moved
+			--color-moved-ws= --no-color-moved-ws
 			--full-index --binary --abbrev --diff-filter=
 			--find-copies-harder --ignore-cr-at-eol
 			--text --ignore-space-at-eol --ignore-space-change
@@ -1520,6 +1527,14 @@ _git_diff ()
 		__gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}"
 		return
 		;;
+	--color-moved=*)
+		__gitcomp "$__git_color_moved_opts" "" "${cur##--color-moved=}"
+		return
+		;;
+	--color-moved-ws=*)
+		__gitcomp "$__git_color_moved_ws_opts" "" "${cur##--color-moved-ws=}"
+		return
+		;;
 	--*)
 		__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
 			--base --ours --theirs --no-index
-- 
2.24.1


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

end of thread, other threads:[~2020-02-24  6:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-20 21:46 [PATCH] completion: add diff --color-moved[-ws] Kir Kolyshkin
2020-02-20 23:30 ` Matheus Tavares Bernardino
2020-02-21  0:11   ` Matheus Tavares Bernardino
2020-02-21 20:15   ` Kirill Kolyshkin
2020-02-21 20:15 ` [PATCH v2] " Kir Kolyshkin
2020-02-23  5:05   ` Matheus Tavares
2020-02-24  4:41     ` Kirill Kolyshkin
2020-02-24  6:02       ` Matheus Tavares Bernardino

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 NNTP newsgroup(s).