From: Lee Marlow <lee.marlow@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org, Lee Marlow <lee.marlow@gmail.com>
Subject: [PATCH 7/8] bash completion: Add completion for 'git ls-files'
Date: Mon, 4 Aug 2008 23:50:37 -0600 [thread overview]
Message-ID: <1217915438-6838-8-git-send-email-lee.marlow@gmail.com> (raw)
In-Reply-To: <1217915438-6838-7-git-send-email-lee.marlow@gmail.com>
Added 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>
---
contrib/completion/git-completion.bash | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 61ea6d9..936cd35 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -883,6 +883,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)"
@@ -1590,6 +1610,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;;
--
1.6.0.rc1.48.g2b6032
next prev parent reply other threads:[~2008-08-05 5:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 5:50 [PATCH 0/8] bash completion: more porcelain completions Lee Marlow
2008-08-05 5:50 ` [PATCH 1/8] bash completion: Add completion for 'git clone' Lee Marlow
2008-08-05 5:50 ` [PATCH 2/8] bash completion: Add completion for 'git clean' Lee Marlow
2008-08-05 5:50 ` [PATCH 3/8] bash completion: Add completion for 'git init' Lee Marlow
2008-08-05 5:50 ` [PATCH 4/8] bash completion: Add completion for 'git revert' Lee Marlow
2008-08-05 5:50 ` [PATCH 5/8] bash completion: More completions for 'git stash' Lee Marlow
2008-08-05 5:50 ` [PATCH 6/8] bash completion: Add completion for 'git archive' Lee Marlow
2008-08-05 5:50 ` Lee Marlow [this message]
2008-08-06 15:45 ` [PATCH] bash: remove redundant check for 'git stash apply' options SZEDER Gábor
2008-08-06 15:47 ` Shawn O. Pearce
2008-08-05 14:29 ` [PATCH 0/8] bash completion: more porcelain completions Shawn O. Pearce
2008-08-05 18:58 ` Junio C Hamano
2008-08-05 19:09 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1217915438-6838-8-git-send-email-lee.marlow@gmail.com \
--to=lee.marlow@gmail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).