]> code.ossystems Code Review - openembedded-core.git/commitdiff
git: add basic tab completion support
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Tue, 10 Feb 2015 19:17:38 +0000 (14:17 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 14 Feb 2015 08:40:36 +0000 (08:40 +0000)
Trying to use git w/o tab completion is especially annoying if
you are used to using it elsewhere -- "whatchanged" is simply
too annoying to type out in full more than once.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/git/git.inc

index ace1790a0292eea527ad64f6554a3fce192b2915..ddb1ceed999b6f234979d43fa35262d569b9a70c 100644 (file)
@@ -38,6 +38,8 @@ do_install () {
        install -t ${D}/${mandir}/man1 ${WORKDIR}/man1/*
        install -t ${D}/${mandir}/man5 ${WORKDIR}/man5/*
        install -t ${D}/${mandir}/man7 ${WORKDIR}/man7/*
+       install -d ${D}/${datadir}/bash-completion/completions/
+       install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git
 }
 
 perl_native_fixup () {
@@ -94,6 +96,10 @@ PERLTOOLS = " \
     ${datadir}/git-core/templates/hooks/pre-rebase.sample \
 "
 
+# Basic tab completion support
+PACKAGES =+ "${PN}-bash-completion"
+FILES_${PN}-bash-completion = "${datadir}/bash-completion/completions/*"
+
 # Git tools requiring perl
 PACKAGES =+ "${PN}-perltools"
 FILES_${PN}-perltools += " \