[arch-commits] Commit in bash-completion/repos (3 files)

Dave Reisner dreisner at archlinux.org
Tue Apr 12 12:28:55 UTC 2016


    Date: Tuesday, April 12, 2016 @ 14:28:55
  Author: dreisner
Revision: 264712

archrelease: copy trunk to testing-any

Added:
  bash-completion/repos/testing-any/
  bash-completion/repos/testing-any/PKGBUILD
    (from rev 264711, bash-completion/trunk/PKGBUILD)
  bash-completion/repos/testing-any/bash-4.3.patch
    (from rev 264711, bash-completion/trunk/bash-4.3.patch)

----------------+
 PKGBUILD       |   41 +++++++++++++++++++++++++++++++++++++++++
 bash-4.3.patch |   27 +++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)

Copied: bash-completion/repos/testing-any/PKGBUILD (from rev 264711, bash-completion/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2016-04-12 12:28:55 UTC (rev 264712)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=bash-completion
+pkgver=2.3
+pkgrel=1
+pkgdesc="Programmable completion for the bash shell"
+arch=('any')
+url="https://github.com/scop/bash-completion"
+license=('GPL2')
+depends=('bash')
+options=('!emptydirs' '!makeflags')
+source=("https://github.com/scop/bash-completion/releases/download/2.3/bash-completion-2.3.tar.xz"
+        'bash-4.3.patch')
+sha1sums=('6b42d6747dab48bdc983627e8ce69283ff0e6b79'
+          'd2a01350990c1221bd53d55edf31210c74d02bca')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -p1 -i ../bash-4.3.patch
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr --sysconfdir=/etc
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+
+# bash-completion is sourced in /etc/bash.bashrc so that non-bash shell don't source it
+  rm "${pkgdir}/etc/profile.d/bash_completion.sh"
+
+# remove Slackware's makepkg completion
+  rm "${pkgdir}/usr/share/bash-completion/completions/makepkg"
+
+# remove completions which overlap with util-linux
+  rm "${pkgdir}/usr/share/bash-completion/completions"/{u,}mount
+}

Copied: bash-completion/repos/testing-any/bash-4.3.patch (from rev 264711, bash-completion/trunk/bash-4.3.patch)
===================================================================
--- testing-any/bash-4.3.patch	                        (rev 0)
+++ testing-any/bash-4.3.patch	2016-04-12 12:28:55 UTC (rev 264712)
@@ -0,0 +1,27 @@
+--- a/bash_completion	2014-03-09 17:38:14 +0000
++++ b/bash_completion	2014-03-13 23:26:44 +0000
+@@ -536,13 +536,23 @@
+ # @param $2  Name of variable to return result to
+ _quote_readline_by_ref()
+ {
+-    if [[ $1 == \'* ]]; then
++    if [ -z "$1" ]; then
++        # avoid quoting if empty
++        printf -v $2 %s "$1"
++    elif [[ $1 == \'* ]]; then
+         # Leave out first character
+         printf -v $2 %s "${1:1}"
++    elif [[ $1 == ~* ]]; then
++        # avoid escaping first ~
++        printf -v $2 ~%q "${1:1}"
+     else
+         printf -v $2 %q "$1"
+     fi
+ 
++    # Replace double escaping ( \\ ) by single ( \ )
++    # This happens always when argument is already escaped at cmdline,
++    # and passed to this function as e.g.: file\ with\ spaces
++    [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}"
+     # If result becomes quoted like this: $'string', re-evaluate in order to
+     # drop the additional quoting.  See also: http://www.mail-archive.com/
+     # bash-completion-devel at lists.alioth.debian.org/msg01942.html



More information about the arch-commits mailing list