Skip to content

Commit

Permalink
bash completion: add options for 'git fsck'
Browse files Browse the repository at this point in the history
Signed-off-by: Arto Jonsson <ajonsson@kapsi.fi>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Arto Jonsson authored and Junio C Hamano committed Mar 23, 2009
1 parent ebd15bf commit 4bca863
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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]}"
Expand Down Expand Up @@ -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 ;;
Expand Down

0 comments on commit 4bca863

Please sign in to comment.