@matheusbsbs / matheus-bagliano / commits / 4181c7e8a7
Fork 0

bash completion: Add completion for 'git clean'

Add completions for all long options specified in the docs --dry-run --quiet Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lee Marlow committed Aug 4, 2008 at 23:50 UTC 4181c7e8a7ece0cf117e7ec6bb8bca989e116f7e
1 file changed +15
contrib/completion/git-completion.bash
+15
@@ -667,6 +667,20 @@ _git_cherry_pick ()
667 esac
668 }
669
670 +_git_clean ()
671 +{
672 + __git_has_doubledash && return
673 +
674 + local cur="${COMP_WORDS[COMP_CWORD]}"
675 + case "$cur" in
676 + --*)
677 + __gitcomp "--dry-run --quiet"
678 + return
679 + ;;
680 + esac
681 + COMPREPLY=()
682 +}
683 +
684 _git_clone ()
685 {
686 local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -1523,6 +1537,7 @@ _git ()
1537 checkout) _git_checkout ;;
1538 cherry) _git_cherry ;;
1539 cherry-pick) _git_cherry_pick ;;
1540 + clean) _git_clean ;;
1541 clone) _git_clone ;;
1542 commit) _git_commit ;;
1543 config) _git_config ;;