[bash-completion] Update to 2.0 (fixes #817902, #831835).
Ville Skyttä
scop at fedoraproject.org
Tue Jun 19 17:12:46 UTC 2012
commit b0368872a1df6d7fdc1fe4e02a317681f32519f6
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Tue Jun 19 20:12:36 2012 +0300
Update to 2.0 (fixes #817902, #831835).
- Don't try to python-bytecompile our non-python *.py (#813651).
...sh => bash-completion-2.0-redefine_filedir.bash | 29 +++++++++----------
bash-completion.spec | 12 ++++++--
sources | 2 +-
3 files changed, 24 insertions(+), 19 deletions(-)
---
diff --git a/bash-completion-1.99-redefine_filedir.bash b/bash-completion-2.0-redefine_filedir.bash
similarity index 62%
rename from bash-completion-1.99-redefine_filedir.bash
rename to bash-completion-2.0-redefine_filedir.bash
index f8c2a38..af6d5bb 100644
--- a/bash-completion-1.99-redefine_filedir.bash
+++ b/bash-completion-2.0-redefine_filedir.bash
@@ -13,33 +13,32 @@ _filedir()
_tilde "$cur" || return 0
local -a toks
- local quoted tmp
+ local quoted x tmp
_quote_readline_by_ref "$cur" quoted
- toks=( $(
- compgen -d -- "$quoted" | {
- while read -r tmp; do
- # TODO: I have removed a "[ -n $tmp ] &&" before 'printf ..',
- # and everything works again. If this bug suddenly
- # appears again (i.e. "cd /b<TAB>" becomes "cd /"),
- # remember to check for other similar conditionals (here
- # and _filedir_xspec()). --David
- printf '%s\n' $tmp
- done
- }
- ))
+ x=$( compgen -d -- "$quoted" ) &&
+ while read -r tmp; do
+ toks+=( "$tmp" )
+ done <<< "$x"
if [[ "$1" != -d ]]; then
# Munge xspec to contain uppercase version too
# http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306
xspec=${1:+"!*.@($1|${1^^})"}
- toks+=( $( compgen -f -X "$xspec" -- $quoted ) )
+ x=$( compgen -f -X "$xspec" -- $quoted ) &&
+ while read -r tmp; do
+ toks+=( "$tmp" )
+ done <<< "$x"
fi
# If the filter failed to produce anything, try without it if configured to
[[ -n ${COMP_FILEDIR_FALLBACK:-} && \
-n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \
- toks+=( $( compgen -f -- $quoted ) )
+ x=$( compgen -f -- $quoted ) &&
+ while read -r tmp; do
+ toks+=( "$tmp" )
+ done <<< "$x"
+
if [[ ${#toks[@]} -ne 0 ]]; then
# 2>/dev/null for direct invocation, e.g. in the _filedir unit test
diff --git a/bash-completion.spec b/bash-completion.spec
index 207eb18..b6c4032 100644
--- a/bash-completion.spec
+++ b/bash-completion.spec
@@ -1,8 +1,10 @@
# Expected failures in mock, hangs in koji
%bcond_with tests
+# The *.py files we ship are not python scripts, #813651
+%global _python_bytecompile_errors_terminate_build 0
Name: bash-completion
-Version: 1.99
+Version: 2.0
Release: 1%{?dist}
Epoch: 1
Summary: Programmable completion for Bash
@@ -12,8 +14,8 @@ URL: http://bash-completion.alioth.debian.org/
Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
Source2: CHANGES.package.old
# https://bugzilla.redhat.com/677446, see also noblacklist patch
-Source3: %{name}-1.99-redefine_filedir.bash
-# https://bugzilla.redhat.com/677446, see also filedir source
+Source3: %{name}-2.0-redefine_filedir.bash
+# https://bugzilla.redhat.com/677446, see also redefine_filedir source
Patch0: %{name}-1.99-noblacklist.patch
BuildArch: noarch
@@ -74,6 +76,10 @@ exit $result
%changelog
+* Tue Jun 19 2012 Ville Skyttä <ville.skytta at iki.fi> - 1:2.0-1
+- Update to 2.0 (fixes #817902, #831835).
+- Don't try to python-bytecompile our non-python *.py (#813651).
+
* Sun Jan 8 2012 Ville Skyttä <ville.skytta at iki.fi> - 1:1.99-1
- Update to 1.99.
diff --git a/sources b/sources
index 06f75e9..02ddec5 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
26caffcd8a2ed8a8aaec3cca13d9bf0a CHANGES.package.old
-3cf478b7f1065f424d3d6ec35f80e4f2 bash-completion-1.99.tar.bz2
+0d903f398be8c8f24bc5ffa6f86127f8 bash-completion-2.0.tar.bz2
More information about the scm-commits
mailing list