From d1d1afae6d8805fe7e8dcb21794d09817589cd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 8 Jan 2012 14:15:11 +0200 Subject: [PATCH] Update to 1.99. --- bash-completion-1.3-filedir.bash | 36 ------------------- bash-completion-1.90-noblacklist.patch | 21 ----------- bash-completion-1.99-noblacklist.patch | 12 +++++++ ...bash-completion-1.99-redefine_filedir.bash | 8 +++-- bash-completion-plague-client | 15 -------- bash-completion.spec | 17 ++++----- sources | 2 +- 7 files changed, 24 insertions(+), 87 deletions(-) delete mode 100644 bash-completion-1.3-filedir.bash delete mode 100644 bash-completion-1.90-noblacklist.patch create mode 100644 bash-completion-1.99-noblacklist.patch rename bash-completion-1.90-redefine_filedir.bash => bash-completion-1.99-redefine_filedir.bash (88%) delete mode 100644 bash-completion-plague-client diff --git a/bash-completion-1.3-filedir.bash b/bash-completion-1.3-filedir.bash deleted file mode 100644 index 95f9593..0000000 --- a/bash-completion-1.3-filedir.bash +++ /dev/null @@ -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[@]}" ) -} diff --git a/bash-completion-1.90-noblacklist.patch b/bash-completion-1.90-noblacklist.patch deleted file mode 100644 index 769c8f8..0000000 --- a/bash-completion-1.90-noblacklist.patch +++ /dev/null @@ -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 ]] \ diff --git a/bash-completion-1.99-noblacklist.patch b/bash-completion-1.99-noblacklist.patch new file mode 100644 index 0000000..f3cd42e --- /dev/null +++ b/bash-completion-1.99-noblacklist.patch @@ -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 diff --git a/bash-completion-1.90-redefine_filedir.bash b/bash-completion-1.99-redefine_filedir.bash similarity index 88% rename from bash-completion-1.90-redefine_filedir.bash rename to bash-completion-1.99-redefine_filedir.bash index 1361f87..f8c2a38 100644 --- a/bash-completion-1.90-redefine_filedir.bash +++ b/bash-completion-1.99-redefine_filedir.bash @@ -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() diff --git a/bash-completion-plague-client b/bash-completion-plague-client deleted file mode 100644 index 503ceda..0000000 --- a/bash-completion-plague-client +++ /dev/null @@ -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 diff --git a/bash-completion.spec b/bash-completion.spec index a430f59..207eb18 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -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ä - 1:1.99-1 +- Update to 1.99. + * Fri Nov 4 2011 Ville Skyttä - 1:1.90-1 - Update to 1.90. - Specfile cleanups. diff --git a/sources b/sources index 359481a..06f75e9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 26caffcd8a2ed8a8aaec3cca13d9bf0a CHANGES.package.old -82635839d83074eba923822fd584490c bash-completion-1.90.tar.bz2 +3cf478b7f1065f424d3d6ec35f80e4f2 bash-completion-1.99.tar.bz2