Update to 2.0 (fixes #817902, #831835).

- Don't try to python-bytecompile our non-python *.py (#813651).
This commit is contained in:
Ville Skyttä 2012-06-19 20:12:36 +03:00
parent d1d1afae6d
commit b0368872a1
3 changed files with 24 additions and 19 deletions

View File

@ -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

View File

@ -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@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@iki.fi> - 1:1.99-1
- Update to 1.99.

View File

@ -1,2 +1,2 @@
26caffcd8a2ed8a8aaec3cca13d9bf0a CHANGES.package.old
3cf478b7f1065f424d3d6ec35f80e4f2 bash-completion-1.99.tar.bz2
0d903f398be8c8f24bc5ffa6f86127f8 bash-completion-2.0.tar.bz2