Update to 1.99.

This commit is contained in:
Ville Skyttä 2012-01-08 14:15:11 +02:00
parent 6c1548a4c4
commit d1d1afae6d
7 changed files with 24 additions and 87 deletions

View File

@ -1,36 +0,0 @@
# This is a copy of the _filedir function in bash_completion, included
# and (re)defined separately here because some versions of Adobe Reader,
# if installed, are known to override this function with an incompatible
# version, causing various problems.
#
# https://bugzilla.redhat.com/677446
# http://forums.adobe.com/thread/745833
_filedir()
{
local i IFS=$'\n' xspec
_tilde "$cur" || return 0
local -a toks
local quoted tmp
_quote_readline_by_ref "$cur" quoted
toks=( ${toks[@]-} $(
compgen -d -- "$quoted" | {
while read -r tmp; do
printf '%s\n' $tmp
done
}
))
if [[ "$1" != -d ]]; then
[[ ${BASH_VERSINFO[0]} -ge 4 ]] && \
xspec=${1:+"!*.@($1|${1^^})"} || \
xspec=${1:+"!*.@($1|$(printf %s $1 | tr '[:lower:]' '[:upper:]'))"}
toks=( ${toks[@]-} $( compgen -f -X "$xspec" -- $quoted) )
fi
[ ${#toks[@]} -ne 0 ] && _compopt_o_filenames
COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
}

View File

@ -1,21 +0,0 @@
diff -up bash-completion-1.90/bash_completion~ bash-completion-1.90/bash_completion
--- bash-completion-1.90/bash_completion~ 2011-11-03 11:51:35.000000000 +0200
+++ bash-completion-1.90/bash_completion 2011-11-04 21:34:14.073711442 +0200
@@ -45,7 +45,7 @@ readonly BASH_COMPLETION_COMPAT_DIR
# Blacklisted completions, causing problems with our code.
#
-_blacklist_glob='@(acroread.sh)'
+_blacklist_glob='@()'
# Turn on extended globbing and programmable completion
shopt -s extglob progcomp
@@ -1878,7 +1878,7 @@ if [[ -d $BASH_COMPLETION_COMPAT_DIR &&
&& -f $i && -r $i ]] && . "$i"
done
fi
-unset i
+unset i _blacklist_glob
# source user completion file
[[ ${BASH_SOURCE[0]} != ~/.bash_completion && -r ~/.bash_completion ]] \

View File

@ -0,0 +1,12 @@
diff -up bash-completion-1.99/bash_completion~ bash-completion-1.99/bash_completion
--- bash-completion-1.99/bash_completion~ 2012-01-08 01:03:46.000000000 +0200
+++ bash-completion-1.99/bash_completion 2012-01-08 13:50:33.412012530 +0200
@@ -45,7 +45,7 @@ readonly BASH_COMPLETION_COMPAT_DIR
# Blacklisted completions, causing problems with our code.
#
-_blacklist_glob='@(acroread.sh)'
+_blacklist_glob='@()'
# Turn on extended globbing and programmable completion
shopt -s extglob progcomp

View File

@ -41,7 +41,9 @@ _filedir()
-n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \
toks+=( $( compgen -f -- $quoted ) )
[ ${#toks[@]} -ne 0 ] && compopt -o filenames 2>/dev/null
COMPREPLY+=( "${toks[@]}" )
if [[ ${#toks[@]} -ne 0 ]]; then
# 2>/dev/null for direct invocation, e.g. in the _filedir unit test
compopt -o filenames 2>/dev/null
COMPREPLY+=( "${toks[@]}" )
fi
} # _filedir()

View File

@ -1,15 +0,0 @@
# -*- mode: shell-script; sh-basic-offset: 4; indent-tabs-mode: nil -*-
# ex: ts=8 sw=8 noet filetype=sh
# bash completion for plague-client
_plague_client()
{
local cur prev words cword
_init_completion || return
[[ $cword -eq 1 ]] && \
COMPREPLY=( $( compgen -W 'build detail finish help is_paused kill list
list_builders pause requeue unpause update_builders' -- "$cur" ) )
} &&
complete -F _plague_client plague-client

View File

@ -2,7 +2,7 @@
%bcond_with tests
Name: bash-completion
Version: 1.90
Version: 1.99
Release: 1%{?dist}
Epoch: 1
Summary: Programmable completion for Bash
@ -10,13 +10,11 @@ Summary: Programmable completion for Bash
License: GPLv2+
URL: http://bash-completion.alioth.debian.org/
Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
# In upstream post-1.90 git:
Source1: %{name}-plague-client
Source2: CHANGES.package.old
# https://bugzilla.redhat.com/677446, see also noblacklist patch
Source3: %{name}-1.90-redefine_filedir.bash
Source3: %{name}-1.99-redefine_filedir.bash
# https://bugzilla.redhat.com/677446, see also filedir source
Patch0: %{name}-1.90-noblacklist.patch
Patch0: %{name}-1.99-noblacklist.patch
BuildArch: noarch
%if %{with tests}
@ -44,8 +42,6 @@ make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
install -pm 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/plague-client
# Updated completion shipped in cowsay package:
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/{cowsay,cowthink}
@ -53,10 +49,6 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/{cowsay,cowthink}
install -Dpm 644 %{SOURCE3} \
$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/redefine_filedir
# Fixed in upstream post-1.90 git:
chmod -c 644 $RPM_BUILD_ROOT%{_datadir}/bash-completion/bash_completion
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
%if %{with tests}
%check
@ -82,6 +74,9 @@ exit $result
%changelog
* Sun Jan 8 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:1.99-1
- Update to 1.99.
* Fri Nov 4 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.90-1
- Update to 1.90.
- Specfile cleanups.

View File

@ -1,2 +1,2 @@
26caffcd8a2ed8a8aaec3cca13d9bf0a CHANGES.package.old
82635839d83074eba923822fd584490c bash-completion-1.90.tar.bz2
3cf478b7f1065f424d3d6ec35f80e4f2 bash-completion-1.99.tar.bz2