[arch-commits] Commit in bash-completion/trunk (PKGBUILD bash-4.3.patch)
Bartłomiej Piotrowski
bpiotrowski at nymeria.archlinux.org
Mon Mar 17 11:04:34 UTC 2014
Date: Monday, March 17, 2014 @ 12:04:34
Author: bpiotrowski
Revision: 208061
upgpkg: bash-completion 2.1-3
fix issues related to bash 4.3 (FS#39142)
Added:
bash-completion/trunk/bash-4.3.patch
Modified:
bash-completion/trunk/PKGBUILD
----------------+
PKGBUILD | 13 ++++++++++---
bash-4.3.patch | 27 +++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-03-17 11:01:16 UTC (rev 208060)
+++ PKGBUILD 2014-03-17 11:04:34 UTC (rev 208061)
@@ -3,7 +3,7 @@
pkgname=bash-completion
pkgver=2.1
-pkgrel=2
+pkgrel=3
pkgdesc="Programmable completion for the bash shell"
arch=('any')
url="http://bash-completion.alioth.debian.org/"
@@ -10,9 +10,16 @@
license=('GPL')
depends=('bash')
options=('!emptydirs' '!makeflags')
-source=(http://bash-completion.alioth.debian.org/files/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('4e2a9f11a4042a38ee79ddcd048e8b9e')
+source=(http://bash-completion.alioth.debian.org/files/${pkgname}-${pkgver}.tar.bz2
+ bash-4.3.patch)
+md5sums=('4e2a9f11a4042a38ee79ddcd048e8b9e'
+ 'f964553680d88a89dbe8a7275e94bd3b')
+prepare() {
+ cd ${pkgname}-${pkgver}
+ patch -p1 -i ../bash-4.3.patch
+}
+
build() {
cd ${pkgname}-${pkgver}
./configure --prefix=/usr --sysconfdir=/etc
Added: bash-4.3.patch
===================================================================
--- bash-4.3.patch (rev 0)
+++ bash-4.3.patch 2014-03-17 11:04:34 UTC (rev 208061)
@@ -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