summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Marlow <lee.marlow@gmail.com>2008-08-05 05:50:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-06 04:21:19 (GMT)
commitb1bc1494edb1775e94a159dea67908b27c29017f (patch)
tree144de061f1335c0f06f49dc5b252b7d77a7d1c9d
parentb3191ce2d5a77c17e5a236823f2dc7393e440171 (diff)
downloadgit-b1bc1494edb1775e94a159dea67908b27c29017f.zip
git-b1bc1494edb1775e94a159dea67908b27c29017f.tar.gz
git-b1bc1494edb1775e94a159dea67908b27c29017f.tar.bz2
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>
-rwxr-xr-xcontrib/completion/git-completion.bash21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3209e5c..7a7bc99 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -906,6 +906,26 @@ _git_init ()
COMPREPLY=()
}
+_git_ls_files ()
+{
+ __git_has_doubledash && return
+
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --*)
+ __gitcomp "--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
+ "
+ return
+ ;;
+ esac
+ COMPREPLY=()
+}
+
_git_ls_remote ()
{
__gitcomp "$(__git_remotes)"
@@ -1614,6 +1634,7 @@ _git ()
help) _git_help ;;
init) _git_init ;;
log) _git_log ;;
+ ls-files) _git_ls_files ;;
ls-remote) _git_ls_remote ;;
ls-tree) _git_ls_tree ;;
merge) _git_merge;;