summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2e3a430)
raw | patch | inline | side by side (parent: 2e3a430)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 4 Feb 2007 07:38:23 +0000 (02:38 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 4 Feb 2007 08:18:41 +0000 (00:18 -0800) |
The new --interactive mode of git-add can be very useful, so users
will probably want to have completion for it.
Likewise the new git-add--interactive executable is actually a
plumbing command. Its invoked by `git add --interactive` and is
not intended to be invoked directly by the user. Therefore we
should hide it from the list of available Git commands.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
will probably want to have completion for it.
Likewise the new git-add--interactive executable is actually a
plumbing command. Its invoked by `git add --interactive` and is
not intended to be invoked directly by the user. Therefore we
should hide it from the list of available Git commands.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/completion/git-completion.bash | patch | blob | history |
index b87f96d9eadb0b99fbe3ce2c1e1c0e38b9601b13..93f2af5e1fd8f83b58bdf55a8d3502fa807aff66 100755 (executable)
for i in $(git help -a|egrep '^ ')
do
case $i in
+ add--interactive) : plumbing;;
cat-file) : plumbing;;
check-ref-format) : plumbing;;
commit-tree) : plumbing;;
COMPREPLY=()
}
+_git_add ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --*)
+ COMPREPLY=($(compgen -W "
+ --interactive
+ " -- "$cur"))
+ return
+ esac
+ COMPREPLY=()
+}
+
_git_branch ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$command" in
am) _git_am ;;
+ add) _git_add ;;
apply) _git_apply ;;
branch) _git_branch ;;
checkout) _git_checkout ;;
# included the '.exe' suffix.
#
if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
+complete -o default -F _git_add git-add.exe
complete -o default -F _git_apply git-apply.exe
complete -o default -o nospace -F _git git.exe
complete -o default -F _git_branch git-branch.exe