threads / patch / 18470

patchbash completion: add options for 'git fsck'

Subject: [PATCH] bash completion: add options for 'git fsck'

## tl;dr

2 messages between Mar 22, 2009 and Mar 23, 2009. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Arto Jonsson· Mar 22, 2009, 18:49 UTC · lore
Signed-off-by: Arto Jonsson <ajonsson@kapsi.fi>
---
 contrib/completion/git-completion.bash |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
Show changes to contrib/completion/git-completion.bash +16 −0
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index ed235f7..e738830 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -952,6 +952,21 @@ _git_format_patch ()
 	__git_complete_revlist
 }
 
+_git_fsck ()
+{
+	local cur="${COMP_WORDS[COMP_CWORD]}"
+	case "$cur" in
+	--*)
+		__gitcomp "
+			--tags --root --unreachable --cache --no-reflogs --full
+			--strict --verbose --lost-found
+			"
+		return
+		;;
+	esac
+	COMPREPLY=()
+}
+
 _git_gc ()
 {
 	local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -1880,6 +1895,7 @@ _git ()
 	diff)        _git_diff ;;
 	fetch)       _git_fetch ;;
 	format-patch) _git_format_patch ;;
+	fsck)        _git_fsck ;;
 	gc)          _git_gc ;;
 	grep)        _git_grep ;;
 	help)        _git_help ;;
-- 
1.6.2.GIT
Shawn O. Pearce· Mar 23, 2009, 00:38 UTC · re: Arto Jonsson · lore

Re: [PATCH] bash completion: add options for 'git fsck'

Arto Jonsson <ajonsson@kapsi.fi> wrote:
> Signed-off-by: Arto Jonsson <ajonsson@kapsi.fi>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
>  contrib/completion/git-completion.bash |   16 ++++++++++++++++
>  1 files changed, 16 insertions(+), 0 deletions(-)
-- 
Shawn.

← back to recent threads