@matheusbsbs / matheus-bagliano / commits / b1bc1494ed
Fork 0

bash completion: Add completion for 'git ls-files'

Add completions for all long options specified in the docs --cached --deleted --modified --others --ignored --stage --directory --no-empty-directory --unmerged --killed --exclude= --exclude-from= --exclude-per-directory= --exclude-standard --error-unmatch --with-tree= --full-name --abbrev --ignored --exclude-per-directory 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 b1bc1494edb1775e94a159dea67908b27c29017f
1 file changed +21
contrib/completion/git-completion.bash
+21
@@ -906,6 +906,26 @@ _git_init ()
906 COMPREPLY=()
907 }
908
909 +_git_ls_files ()
910 +{
911 + __git_has_doubledash && return
912 +
913 + local cur="${COMP_WORDS[COMP_CWORD]}"
914 + case "$cur" in
915 + --*)
916 + __gitcomp "--cached --deleted --modified --others --ignored
917 + --stage --directory --no-empty-directory --unmerged
918 + --killed --exclude= --exclude-from=
919 + --exclude-per-directory= --exclude-standard
920 + --error-unmatch --with-tree= --full-name
921 + --abbrev --ignored --exclude-per-directory
922 + "
923 + return
924 + ;;
925 + esac
926 + COMPREPLY=()
927 +}
928 +
929 _git_ls_remote ()
930 {
931 __gitcomp "$(__git_remotes)"
@@ -1614,6 +1634,7 @@ _git ()
1634 help) _git_help ;;
1635 init) _git_init ;;
1636 log) _git_log ;;
1637 + ls-files) _git_ls_files ;;
1638 ls-remote) _git_ls_remote ;;
1639 ls-tree) _git_ls_tree ;;
1640 merge) _git_merge;;