Skip to content
Permalink
Browse files

bash-completion: always install into $datadir/bash-completion

The bash-completion package by default searches in $HOME/.local and
/usr/local first before /usr, and we should respect local installation
locations instead of always trying to write to a path that is
accessible only to root and could conflict with a package manager.

This removes a toggle in the configure script, which neither actually
worked properly (setting DIR didn’t work) and I believe did the wrong
thing by default anyway.
  • Loading branch information...
chungy committed Aug 6, 2019
1 parent 59e2dec commit b9d4c04c840321f5ec70787d8afb1256766aaa01
Showing with 1 addition and 10 deletions.
  1. +0 −9 configure.ac
  2. +1 −1 man/bash-completion/Makefile.am
@@ -87,13 +87,6 @@ AC_CHECK_DECLS([strcasecmp, strncasecmp], [], [], [[#include <strings.h>]])
AC_CHECK_LIB(i386, i386_iopl)
AC_CHECK_LIB(amd64, amd64_iopl)

AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completion directory]),
[],
[AS_IF([$($PKG_CONFIG --exists bash-completion 2> /dev/null)],
[bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)],
[bashcompletiondir=${datadir}/bash-completion/completions])])

case "$host" in
*-*-mingw* | *-*-cygwin* | *-*-msvc* )
AC_CHECK_TOOL(WINDRES, windres, )
@@ -153,8 +146,6 @@ AC_SUBST(PACKAGE_URL)
AC_SUBST(PACKAGE_RDNS)
AC_SUBST(PACKAGE_ISSUES)

AC_SUBST(bashcompletiondir)

dnl Shut up the datarootdir warnings.
AC_DEFUN([AC_DATAROOTDIR_CHECKED])

@@ -1,4 +1,4 @@
bashcompletiondir=@bashcompletiondir@
bashcompletiondir=@datadir@/bash-completion/completions

BASH_COMPLETION_TEMPLATES = \
doom.template \

0 comments on commit b9d4c04

Please sign in to comment.
You can’t perform that action at this time.