[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-243-g5961c3b
David Paleino
dapal at debian.org
Mon May 2 15:01:38 UTC 2011
The following commit has been merged in the master branch:
commit 5961c3b8cdeebb8d0f2238970490cdc0d9b26c36
Author: David Paleino <dapal at debian.org>
Date: Mon May 2 17:01:23 2011 +0200
Layout change: everything is now in /usr/share/bash-completion/, rather than in /etc/.
diff --git a/CHANGES b/CHANGES
index 2db8963..d77900d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,8 @@ bash-completion (2.x)
* added puppet completion, using work from Mathieu Parent (sathieudebian.org)
[ David Paleino ]
+ * Layout change: everything is now in /usr/share/bash-completion/, rather
+ than in /etc/.
* If _filedir 'ext' returns nothing, just fallback to generic
file completion. Patch by Clint Byrum (Debian: #619014, LP: #533985)
* Fix broken _allowed_groups usage (shadow and coreutils)
diff --git a/Makefile.am b/Makefile.am
index 6550a83..a41181d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,12 +1,12 @@
SUBDIRS = completions test
-sysconf_DATA = bash_completion
+data_DATA = bash_completion
profiledir = $(sysconfdir)/profile.d
profile_DATA = bash_completion.sh
bash_completion.sh: bash_completion.sh.in Makefile
- sed -e 's|@sysconfdir[@]|$(sysconfdir)|' <$(srcdir)/$@.in >$@
+ sed -e 's|@datadir[@]|$(datadir)|' <$(srcdir)/$@.in >$@
CLEANFILES = bash_completion.sh
@@ -14,6 +14,7 @@ EXTRA_DIST = CHANGES $(sysconf_DATA) bash_completion.sh.in
install-data-hook:
tmpfile=`mktemp $${TMPDIR:-/tmp}/bash_completion.XXXXXX` && \
- sed -e 's|=/etc/bash_completion|=$(sysconfdir)/bash_completion|' \
- $(DESTDIR)$(sysconfdir)/bash_completion > $$tmpfile && \
- mv $$tmpfile $(DESTDIR)$(sysconfdir)/bash_completion
+ sed -e 's|=/usr/share/bash-completion/|=$(datadir)/|' \
+ -e 's|=/etc/bash_completion|=$(sysconfdir)/bash_completion|' \
+ $(DESTDIR)$(datadir)/bash_completion > $$tmpfile && \
+ mv $$tmpfile $(DESTDIR)$(datadir)/bash_completion
diff --git a/bash_completion b/bash_completion
index 581ace7..9be04a1 100644
--- a/bash_completion
+++ b/bash_completion
@@ -39,10 +39,11 @@ fi
# Alter the following to reflect the location of this file.
#
-[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/etc/bash_completion
-[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/etc/bash_completion.d
+[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/usr/share/bash-completion/bash_completion
+[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/usr/share/bash-completion/completions
+[ -n "$BASH_COMPLETION_HELPERS_DIR" ] || BASH_COMPLETION_HELPERS_DIR=/usr/share/bash-completion/helpers
[ -n "$BASH_COMPLETION_COMPAT_DIR" ] || BASH_COMPLETION_COMPAT_DIR=/etc/bash_completion.d
-readonly BASH_COMPLETION BASH_COMPLETION_DIR BASH_COMPLETION_COMPAT_DIR
+readonly BASH_COMPLETION BASH_COMPLETION_DIR BASH_COMPLETION_HELPERS_DIR BASH_COMPLETION_COMPAT_DIR
# Set a couple of useful vars
#
diff --git a/completions/perl b/completions/perl
index 3c3423f..eb1b4b2 100644
--- a/completions/perl
+++ b/completions/perl
@@ -5,7 +5,7 @@ have perl || return
_perlmodules()
{
COMPREPLY=( $( compgen -P "$prefix" -W \
- "$( ${1:-perl} ${BASH_SOURCE[0]%/*}/helpers/perl modules $cur )" \
+ "$( ${1:-perl} $BASH_COMPLETION_HELPERS_DIR/perl modules $cur )" \
-- "$cur" ) )
__ltrim_colon_completions "$prefix$cur"
}
@@ -13,7 +13,7 @@ _perlmodules()
_perlfunctions()
{
COMPREPLY=( $( compgen -P "$prefix" -W \
- "$( ${1:-perl} ${BASH_SOURCE[0]%/*}/helpers/perl functions $cur )" \
+ "$( ${1:-perl} $BASH_COMPLETION_HELPERS_DIR/perl functions $cur )" \
-- "$cur" ) )
}
diff --git a/configure.ac b/configure.ac
index 5e3265e..e4a7762 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,9 @@
AC_PREREQ([2.59])
AC_INIT([bash-completion], [1.99])
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip -Wall -Werror])
-AC_SUBST(bashcompdir, $sysconfdir/bash_completion.d)
-AC_SUBST(helpersdir, $sysconfdir/bash_completion.d/helpers)
+AC_SUBST(datadir, $datarootdir/bash-completion)
+AC_SUBST(bashcompdir, $datadir/completions)
+AC_SUBST(helpersdir, $datadir/helpers)
+AC_SUBST(compatdir, $sysconfdir/bash_completion.d)
AC_CONFIG_FILES([Makefile completions/Makefile completions/helpers/Makefile test/Makefile])
AC_OUTPUT
--
bash-completion
More information about the Bash-completion-commits
mailing list