summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-20 20:40:07 +0200
committerJunio C Hamano <gitster@pobox.com>2018-05-21 13:23:14 +0900
commite11dca10cfb3ef1e561c3e789b346a9719f0344a (patch)
treec90664e9c42d3b5265b23c02127804524e97171d /contrib
parent65b5f9483eafea0ccdea59884da4e00e0cfeee1f (diff)
downloadgit-e11dca10cfb3ef1e561c3e789b346a9719f0344a.tar.gz
completion: add and use --list-cmds=nohelpers
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash20
1 files changed, 4 insertions, 16 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index cd1d8e553f..217c8a3d3b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -843,7 +843,7 @@ __git_commands () {
then
printf "%s" "$GIT_TESTING_PORCELAIN_COMMAND_LIST"
else
- git --list-cmds=list-mainporcelain,others,list-complete
+ git --list-cmds=list-mainporcelain,others,nohelpers,list-complete
fi
;;
all)
@@ -851,27 +851,15 @@ __git_commands () {
then
printf "%s" "$GIT_TESTING_ALL_COMMAND_LIST"
else
- git --list-cmds=main,others
+ git --list-cmds=main,others,nohelpers
fi
;;
esac
}
-__git_list_commands ()
-{
- local i IFS=" "$'\n'
- for i in $(__git_commands $1)
- do
- case $i in
- *--*) : helper pattern;;
- *) echo $i;;
- esac
- done
-}
-
__git_list_all_commands ()
{
- __git_list_commands all
+ __git_commands all
}
__git_all_commands=
@@ -883,7 +871,7 @@ __git_compute_all_commands ()
__git_list_porcelain_commands ()
{
- __git_list_commands porcelain
+ __git_commands porcelain
}
__git_porcelain_commands=