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

2 messages from 2009-03-22 to 2009-03-23. Participants: Arto Jonsson, Shawn O. Pearce.
Thread: https://gitlist.dev/t/18470

## Arto Jonsson, 2009-03-22 18:49

Subject: [PATCH] bash completion: add options for 'git fsck'
Message-ID: <20090322184907.GA31350@lakka.kapsi.fi>
URL: https://gitlist.dev/e/20090322184907.GA31350%40lakka.kapsi.fi

```
Signed-off-by: Arto Jonsson <ajonsson@kapsi.fi>
---
 contrib/completion/git-completion.bash |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

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, 2009-03-23 00:38

Subject: Re: [PATCH] bash completion: add options for 'git fsck'
Message-ID: <20090323003817.GK23521@spearce.org>
URL: https://gitlist.dev/e/20090323003817.GK23521%40spearce.org
In-Reply-To: <20090322184907.GA31350@lakka.kapsi.fi>

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

```
